Is there any way to convert a string ("abcdef") to an array of string containing its character (["a","b","c","d","e","f"]) without using the String.Split function?
Is there any way to convert a string ( abcdef ) to an array
Share
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.
So you want an array of
string, onechareach:This works because
stringimplementsIEnumerable<char>. SoSelect(c => c.ToString())projects eachcharin thestringto astringrepresenting thatcharandToArrayenumerates the projection and converts the result to an array ofstring.If you’re using an older version of C#: