Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
AnswerRe: Control date in text box Pin
Ashfield16-Jun-08 1:22
Ashfield16-Jun-08 1:22 
AnswerRe: Control date in text box Pin
DaveyM6916-Jun-08 2:04
professionalDaveyM6916-Jun-08 2:04 
AnswerRe: Control date in text box Pin
Ravi Bhavnani16-Jun-08 4:59
professionalRavi Bhavnani16-Jun-08 4:59 
AnswerRe: Control date in text box Pin
PIEBALDconsult16-Jun-08 5:46
mvePIEBALDconsult16-Jun-08 5:46 
GeneralRe: Control date in text box Pin
DaveyM6916-Jun-08 12:04
professionalDaveyM6916-Jun-08 12:04 
GeneralRe: Control date in text box Pin
PIEBALDconsult16-Jun-08 12:24
mvePIEBALDconsult16-Jun-08 12:24 
AnswerRe: Control date in text box Pin
nasma16-Jun-08 7:06
nasma16-Jun-08 7:06 
QuestionConvert to hex Pin
Susanmat15-Jun-08 21:21
Susanmat15-Jun-08 21:21 
I'm using Visual C#.Net coding
I have an array of bytes
public Byte[] byArrData;
I have to send 15 bytes command. In that 2 bytes( byArrData[4], byArrData[5]) is user input. It will be given as integer and it should be converted to hex and send higher byte first and then the lower byte.
For eg. UserId = 1000. In hex it is '03E8' so byArrData[4] = E8 and byArrData[5] = 03.

byArrData[0] = 0x40;
byArrData[1] = 0x12;
byArrData[2] = 0x00;
byArrData[3] = 0x05;
byArrData[4] = UserIdHigherByte;
byArrData[5] = UserIdLowerByte;
byArrData[6] = 0x00;
byArrData[7] = 0x00;
byArrData[8] = 0x00;
byArrData[9] = 0x00;
byArrData[10] = 0x00;
byArrData[11] = 0x00;
byArrData[12] = 0x70;
byArrData[13] = 0x05;
byArrData[14] = 0x0A;

How should I convert it and send in C#. Please help
AnswerRe: Convert to hex Pin
Eslam Afifi15-Jun-08 21:37
Eslam Afifi15-Jun-08 21:37 
GeneralRe: Convert to hex Pin
Susanmat15-Jun-08 23:03
Susanmat15-Jun-08 23:03 
AnswerRe: Convert to hex Pin
Eslam Afifi16-Jun-08 0:06
Eslam Afifi16-Jun-08 0:06 
AnswerRe: Convert to hex Pin
Anthony Mushrow15-Jun-08 23:54
professionalAnthony Mushrow15-Jun-08 23:54 
GeneralRe: Convert to hex Pin
Eslam Afifi16-Jun-08 5:14
Eslam Afifi16-Jun-08 5:14 
GeneralRe: Convert to hex Pin
Anthony Mushrow16-Jun-08 5:16
professionalAnthony Mushrow16-Jun-08 5:16 
GeneralRe: Convert to hex Pin
Eslam Afifi16-Jun-08 6:09
Eslam Afifi16-Jun-08 6:09 
GeneralRe: Convert to hex Pin
Anthony Mushrow16-Jun-08 7:05
professionalAnthony Mushrow16-Jun-08 7:05 
GeneralRe: Convert to hex Pin
Eslam Afifi16-Jun-08 7:17
Eslam Afifi16-Jun-08 7:17 
GeneralRe: Convert to hex Pin
Anthony Mushrow16-Jun-08 7:41
professionalAnthony Mushrow16-Jun-08 7:41 
GeneralRe: Convert to hex Pin
Eslam Afifi16-Jun-08 8:06
Eslam Afifi16-Jun-08 8:06 
GeneralRe: Convert to hex Pin
Anthony Mushrow16-Jun-08 8:31
professionalAnthony Mushrow16-Jun-08 8:31 
GeneralRe: Convert to hex [modified] Pin
Eslam Afifi16-Jun-08 10:53
Eslam Afifi16-Jun-08 10:53 
GeneralRe: Convert to hex Pin
Susanmat16-Jun-08 20:26
Susanmat16-Jun-08 20:26 
AnswerRe: Convert to hex Pin
Eslam Afifi17-Jun-08 2:20
Eslam Afifi17-Jun-08 2:20 
GeneralRe: Convert to hex Pin
Susanmat17-Jun-08 19:34
Susanmat17-Jun-08 19:34 
GeneralRe: Convert to hex Pin
Eslam Afifi17-Jun-08 20:39
Eslam Afifi17-Jun-08 20:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.