Reports the zero-based index of the first occurrence of the specified string in the current string object. A parameter specifies the type of search to use for the specified string.
![]()
The index position of the value parameter if that string is found, or -1 if it is not. If value is string.Empty, the return value is 0.
Index numbering starts from zero.
The comparisonType parameter specifies to search for the value parameter using the current or invariant culture, using a case-sensitive or case-insensitive search, and using word or ordinal comparison rules.