string s = "string";
Console.WriteLine(s[1]); // returns t
char[] chars = s.ToCharArray();
Console.WriteLine(chars[1]); // also returns t
so what is the point in this method?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A string is not a char array. You are confusing the fact that it has an indexer returning char with it being a char array.