Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Return Value

Posted on 2009-07-16
3
Medium Priority
?
147 Views
Last Modified: 2012-05-07
I have a value of 0 and i want to convert it to Hex 0x00 how can I do this if I use the below method I will return a 30 in hex which is 0 however i want it to be null

 Public MM_UC_Lenght_MSB As String = "0"
MM_UC_Lenght_MSB = Strings.Asc(MM_UC_Lenght_MSB)
            MM_UC_Lenght_MSB = Conversion.Hex(MM_UC_Lenght_MSB)
            MM_Configuration_Data_Array.Add(MM_UC_Lenght_MSB)
0
Comment
Question by:cmdolcet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 2000 total points
ID: 24871440
Hello cmdolcet

Try using the VB vbNullChar constant.

Regards,

mwvisa1
Public MM_UC_Lenght_MSB As String = vbNullChar
MM_UC_Lenght_MSB = Strings.Asc(MM_UC_Lenght_MSB) 
MM_UC_Lenght_MSB = Conversion.Hex(MM_UC_Lenght_MSB) 
MM_Configuration_Data_Array.Add(MM_UC_Lenght_MSB)

Open in new window

0
 

Author Comment

by:cmdolcet
ID: 24873194
mwvisa1, what happen if i get the character ACK how do i represent it?
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 24873423
ACK has a decimal value in ASCII of 6 if I am not mistaken, so would be like this: Chr(6).
Similarly, you can set other values based on their char int value using the Chr() function.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question