jate shah

jate shah

  • NA
  • 1
  • 1.3k

Help needed in C Sharp!

Feb 10 2013 9:37 AM
Hi, I am a newbie for c# and wanted some help for my on-going assignment. I have a string buffer whereby later need to parse it to a dynamic structure and do data manipulation. For instance, i have input buffer like , "". "822001234abcdefg4567858" -> "822" is in hexa datatype indicating the fields record and length. "822" in binary is "100000100010", which means field1 - length 10 bytes,field7 - length 8 bytes ,field11 - length 2 bytes, are present in this input buffer. I have already a template in place for fileds 1 to 128. How can i dynamically parse these input data into a structure based on the "822" field indicator. 
Example 1: Buffer1 --> "822001234abcdefg4567858" // [Binary 100000100010] // [ field 1,10,7  present, dynamic struc should have field 1,10 & 17 only ]
Example 2: Buffer2 --> "812001234abcdefg4567858" // [Binary 100000010010] // [field 1,8,11  present, dynamic struc should have field 1,18 & 11 only ]
Thanks in advance for your expert help and suggestions.
kl