Results 1 to 4 of 4

Thread: CHR(&H00) vs. CHR$(&H00)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Fort Worth, Texas, USA
    Posts
    264

    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?

  2. #2

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width