|
-
Sep 20th, 2010, 06:44 PM
#1
Thread Starter
Hyperactive Member
CHR(&H00) vs. CHR$(&H00)
In VB6, I use CHR$(&H00) to create a Null Character.
In VB.Net VS2008 CHR(&H00) creats a Null.
I'm trying to send a Hex(00) to a serial device, but the VB.Net function only sends a null, not a null character.
How can I accomplish this with VB.Net?
-
Sep 21st, 2010, 01:12 AM
#2
Re: CHR(&H00) vs. CHR$(&H00)
Use ControlChars.NullChar constant.
-
Sep 21st, 2010, 01:36 AM
#3
Re: CHR(&H00) vs. CHR$(&H00)
As I've said on a different forum, ControlChars.NullChar will not give any different result because a null character is a null character. The issue lies elsewhere, probably with string handling.
-
Sep 21st, 2010, 01:39 AM
#4
Re: CHR(&H00) vs. CHR$(&H00)
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
|