473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Hex help needed

AMP
What datatype is hex in c# ?
I have:
const ????? ACTION_ERASE_CHECK=0x04;
in c i just have:
#define BSL_ECHECK 0x04

Thanks
Mike

Sep 9 '06 #1
4 1402
Hex isn't a datatype. You probably mean byte or int.

If you were in my classroom, I would have answered your question with a
question: "What data type is 0x04 in C?"

"AMP" <am******@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
What datatype is hex in c# ?
I have:
const ????? ACTION_ERASE_CHECK=0x04;
in c i just have:
#define BSL_ECHECK 0x04

Thanks
Mike

Sep 9 '06 #2
You could store that in a byte or a short or and int or a long, the most
efficient for storage if a byte but for speed is probably and int as an int
is a word size

HTH

Ciaran O'Donnell

"AMP" wrote:
What datatype is hex in c# ?
I have:
const ????? ACTION_ERASE_CHECK=0x04;
in c i just have:
#define BSL_ECHECK 0x04

Thanks
Mike

Sep 9 '06 #3
The code:
const int x = 0x32;

compiles just fine for me...

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins

"AMP" <am******@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
What datatype is hex in c# ?
I have:
const ????? ACTION_ERASE_CHECK=0x04;
in c i just have:
#define BSL_ECHECK 0x04

Thanks
Mike

Sep 9 '06 #4
AMP wrote:
What datatype is hex in c# ?
I have:
const ????? ACTION_ERASE_CHECK=0x04;
in c i just have:
#define BSL_ECHECK 0x04
It could be any integer type.

If int in C is 32 bit and you need to have
the same number of bits in C# then you should
use int too.

Arne
Sep 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: System | last post by:
Hello All, Redhat 9.0 Mysql 3.23.56 ==> Running I want to upgarde to 4.0.13 but this is the error it says: # rpm -Uvh MySQL-server-4.0.13-0.i386.rpm warning: MySQL-server-4.0.13-0.i386.rpm: V3...
8
by: Stephen | last post by:
I am trying to add some code to below to include a datatable and fill the datatable. The reason for doing this is so as I can check to see whether there are any rows returned by the stored...
13
by: Joe Feldman | last post by:
This position is located in the South Bay Area in Northern California. If you are interested please send me your resume in a word .doc so that I can review it. If this does not look like a match,...
0
by: Cindy B | last post by:
Please send your resume and position to Cindy@AtlanticResource.com! I CAN NOT accept candidates that ARE OUTSIDE OF THE US! NO PHONE CALLS PLEASE! Email your resume to me! Position:SQL...
3
by: Wade | last post by:
I would like to install the .Net 1.1 framework on a Web Server running W2K to be able to run ASP.NET files, but I'm not sure where to find the files I need for the .Net framework. I have ".NET...
17
by: dingoatemydonut | last post by:
The C99 standard states: "In the abstract machine, all expressions are evaluated as specified by the semantics. An actual implementation need not evaluate part of an expression if it can deduce...
5
by: Steve | last post by:
Hi, I am sitting down to design our next set of internal apps. I would like to approach this in a way that would allow me to break logical parts of the application that handle specific tasks...
0
by: ultradiv | last post by:
I have a VB.NET application partly built that produces an xml output (just a file at present) I have a .NET webserver and SQLserver 2000 I need to be able to send the xml to the webserver/database...
28
by: Ian Davies | last post by:
Hello I would appreciate some help from someone who has knowledge of working with css, php javascript and how they interact. Ive been working on a task for the last few days and have started to...
37
by: C_guy | last post by:
Does anyone know of a (hopefully free) tool that can traverse a project and determine which "#include"s are not needed or needed in every .C file? This would be helpful in removing header...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.