Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How Can I Specify a Number in Hexadecimal Format in Microsoft Visual Basic?

Primary Software: Measurement Studio>>Standard Edition (Starter Kit)
Primary Software Version: 6.0
Primary Software Fixed Version: N/A
Secondary Software: Measurement Studio>>Professional Edition (Base Package), Measurement Studio>>Enterprise Edition (Full Development System)

Problem: I am trying to specify a number in hexadecimal format in Visual Basic, but the compiler doesn't recognize the 0x prefix, which is the standard for most languages. What is the proper prefix in Visual Basic?

Solution: As you may know, the 0x portion of any hex value is really just a notation to signify that the value is in hex, as opposed to regular decimal or other number format. In Visual Basic, to indicate a hex value, you precede it with &H.

Related Links:

Attachments:





Report Date: 01/06/2003
Last Updated: 10/27/2004
Document ID: 2T5E5IRY

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit