C Sharp string.IndexOf
From Coderwiki
More actions
C Sharp implements the IndexOf method on the string type.
See String position for general information on the usage of this method.
Example
edit edit sourcestring haystack = "Hello world, C# is a programming language";
string needle = "C#";
int position = haystack.IndexOf(needle);
Console.WriteLine(position);
Output:
13