Return Value

This method performs an ordinal (case-sensitive and culture-insensitive) comparison. The search begins at the first character position of this string and continues through the last character position.

If you are interested in the position of the substring value in the current instance, you can call the IndexOf method to get the starting position of its first occurrence, or you can call the LastIndexOf method to get the starting position of its last occurrence. The example includes a call to the IndexOf(String) method if a substring is found in a string instance.