I will be getting a data in bytes during runtime.
The data is categorized like,
First 4 bytes - Integer - VersionNo
Second 4 bytes - Integer - PocketID
Third 2 bytes - Integer - NoOfPackets
Fourth - can be any size in bytes - Description
Now i have already declared the variables to store in the corresponding values.
public int m_iICDVersion;
public int m_iPacketID;
public int m_iPacketCounter0;
public int m_iNoOfBytes;
public string m_strData;
I want a function to segregate the whole byte and store the respective values to the declared variables.