Isn’t having String enough?
Just as an example,
why can String class lets you pass either char array or string array to its Split method?
while it’s perfectly valid to use just string version?
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.
Strings are an abstraction for arrays of characters. As such, they are technically reference types (although, unlike most references types, they are immutable) even for single-char strings. Characters, on the other hand are actually value types themselves. (MSDN 1, MSDN 2)
C# Replace Performance shows a performance implication of this, in which using character arrays is 4x faster than using string arrays.