for example when I wrote:
Char[] test = new Char[3] {a,b,c};
test[2] = null;
it says Cannot convert null to ‘char’ because it is a non-nullable value type
if I need to empty that array of char, is there a solution?
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.
Use a nullable char:
The drawback is you have to check for a value each time you access the array:
or you could use a “magic” char value to represent
null, like\0: