is there a function in C# to find a particular piece of text in a string? I have tried substring but returns false no matter what i give it...
thanks!
Printable View
is there a function in C# to find a particular piece of text in a string? I have tried substring but returns false no matter what i give it...
thanks!
If you're looking for something like VB instr:
Code:string myString = "Hello Techno";
int i = myString.IndexOf("Techno");
MessageBox.Show(i.ToString()); // Displays "6"