+92 332 4229 857 99ProjectIdeas@Gmail.com

String IndexOf Function (C#.net)




Determining the character is placed at which location.






For example:


     string strOne = "rocks Rum";
            int count = strOne.IndexOf('R');
            MessageBox.Show(count.ToString());

Output:
                 6 (because ‘R’ is located at index 6 from the start)

0 comments: