i'm trying to convert a program from vb.net to C#
but i can't find the equivalent for ControlChars.NullChar in C#
i tried '\0' but it does not give me the same result.
can anyone help please?
Printable View
i'm trying to convert a program from vb.net to C#
but i can't find the equivalent for ControlChars.NullChar in C#
i tried '\0' but it does not give me the same result.
can anyone help please?
What is the exact line to be replaced ?
Convert.ToChar(0) ?
yes i tried ConvertToChar(0) and also Convert.ToChar(0x0)
but it seems that i might wrong and it works after all, I'm still working on this and will update the thread when done.
thanks for the help guys.
'\0' is indeed the equivalent.
The issue is more likely related to the fact that VB allows you to interchange characters and strings (e.g., use characters where a string is expected and strings where a character is expected), while C# does not.
Yea, sorry guys the problem was not with the null char at all i just thought it is.
thanks again for the replay's !