Preferred Hex conversion in C#
Preferred Hex conversion in C#
Is there a preferred hex conversion for can data? In c# I'm using Convert.ToInt32(fields[0], 16). Is this correct? Any help would be greatly appreciated.
Re: Preferred Hex conversion in C#
Hello,
yes. It is OK. Check the PCAN-Basic samples. In there you will find a lot of code in C# (and other languages). For instance:
yes. It is OK. Check the PCAN-Basic samples. In there you will find a lot of code in C# (and other languages). For instance:
Code: Select all
// We configurate the Message. The ID,
// Length of the Data, Message Type
// and the data
//
CANMsg.ID = Convert.ToUInt32(txtID.Text, 16);
Best regards,
Keneth
Keneth
Re: Preferred Hex conversion in C#
Perfect, thanks!