C # IndexOf usage

       Record a little knowledge about IndexOf, we know IndexOf method is used to obtain a position of a character in a string.

       str.IndexOf ( "character look"); returns the character for the first time to appear, but note that a small point. Returns IndexOf has a value starting from 0 (inclusive), not the value of -1 is returned when it is judged not to be equal to 0 is determined.

Published 109 original articles · won praise 42 · views 570 000 +

Guess you like

Origin blog.csdn.net/sinat_28984567/article/details/104184336