How are 4 bytes chars are represented in C#? Like one char or a set of 2 chars?
var someCharacter = 'x'; //put 4 bytes UTF-16 character
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.
C# can only store characters from the Basic Multilingual Plane in the
chartype. For characters outside this plane twochars must be used – called surrogates.You can also use a string literal such as:
See UTF-16.