|
-
Dec 13th, 2010, 07:37 AM
#1
[RESOLVED] the equivalent for ControlChars.NullChar in C# ?
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?
* Rate It  If you Like it
__________________________________________________________________________________________
" Programming is like sex: one mistake and you’re providing support for a lifetime."
Get last SQL insert ID 
-
Dec 13th, 2010, 07:57 AM
#2
Re: the equivalent for ControlChars.NullChar in C# ?
What is the exact line to be replaced ?
-
Dec 13th, 2010, 08:31 AM
#3
Re: the equivalent for ControlChars.NullChar in C# ?
-
Dec 13th, 2010, 08:41 AM
#4
Re: the equivalent for ControlChars.NullChar in C# ?
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.
* Rate It  If you Like it
__________________________________________________________________________________________
" Programming is like sex: one mistake and you’re providing support for a lifetime."
Get last SQL insert ID 
-
Dec 13th, 2010, 11:05 AM
#5
Re: the equivalent for ControlChars.NullChar in C# ?
'\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.
-
Dec 13th, 2010, 01:56 PM
#6
Re: the equivalent for ControlChars.NullChar in C# ?
Yea, sorry guys the problem was not with the null char at all i just thought it is.
thanks again for the replay's !
* Rate It  If you Like it
__________________________________________________________________________________________
" Programming is like sex: one mistake and you’re providing support for a lifetime."
Get last SQL insert ID 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|