[StructLayout(LayoutKind.Sequential)] public class Blob { #region Properties public int ProductLength { get; set; } public string ProductName { get; set; } public byte ProductVersion { get; set; } public byte ProductRevision { get; set; } public ushort ProtocolVersion { get; set; } public ushort ProductId { get; set; } public byte DataCount { get; set; } public ProductData ProductData { get; set; } #endregion }
Blob blob = new Blob(); int i = 0; int j = blob.ProductLength = bytes[i]; for (int count = i+1; count < j; count++) blob.ProductName = blob.ProductName+ bytes[count].ToString();
GetString(bytes, i, j)
Encoding
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)