Converting to Hex

C

Cdude

I am receiving data from a machine though a Ethernet port.But when C#
pulls the data in it reads the data as decimal not hexadecimal.How can
i pull the data as a hex and not as a decimal?please any suggestions.
 
S

suresh shenoy

I am receiving data from a machine though a Ethernet port.But when C#
pulls the data in it reads the data as decimal not hexadecimal.How can
i pull the data as a hex and not as a decimal?please any suggestions.

The data is stored in binary and is represented by the IDE as decimal
or hex. You need to change the setting to view the data in hex.


Suresh M. Shenoy
 
C

Cdude

The data is stored in binary and is represented by the IDE as decimal
or hex. You need to change the setting to view the data in hex.

Suresh M. Shenoy

How do i do this?
 
J

Jon Skeet [C# MVP]

I am receiving data from a machine though a Ethernet port.But when C#
pulls the data in it reads the data as decimal not hexadecimal.How can
i pull the data as a hex and not as a decimal?please any suggestions.

What exactly do you mean by "reads the data as decimal not
hexadecimal"? Bear in mind that as far as the computer is concerned
it's just numbers (bits, even). Numbers themselves aren't inherently
decimal or hex - they're just numbers. How you format the numbers is
up to you.

Now, presumably you are seeing a decimal representation somewhere that
you want to see hex. Where is that?

Jon
 
C

Cdude

What exactly do you mean by "reads the data as decimal not
hexadecimal"? Bear in mind that as far as the computer is concerned
it's just numbers (bits, even). Numbers themselves aren't inherently
decimal or hex - they're just numbers. How you format the numbers is
up to you.

Now, presumably you are seeing a decimal representation somewhere that
you want to see hex. Where is that?

Jon

Okay seem to of managed to get it right
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top