Does anybody know if there's a function like "InStr" as it is
in VB or VB.NET?
thx!
Printable View
Does anybody know if there's a function like "InStr" as it is
in VB or VB.NET?
thx!
I'd start out looking in the System.String class first. If you don't figure it out by the time my other comp is put back togeather I post a sample. I don't have any of my code on this pc.
sont know if this is the correct syntax, but it should be
string yourstring = "Apple";
int instringnumber = yourstring.IndexOf("A");
IndexOf is the correct method, just dont know if the the parameter is correct, but it should be that.
You also have LastIndexOf which will get the index of the the last occurance. FYI