I have a c# object with a property called Gender which is declared as a char.
private char _Gender; public char Gender { get{ return _Gender; } set{ _Gender = value; } }
What string is returned/created when I call MyObject.Gender.ToString()?
I ask because I am calling a webservice (which accepts a string rather than a char) so I am doing a ToString on the property as I pass it over. I was expecting it to send an empty string if the char is not set.
However this doesn’t appear to be the case, so the question is what is the string?
The default value of char is unicode 0, so I’d expect ‘\u0000’ to be returned.