示例#1
0
 /// <summary>
 /// construct the word from the entire enumeration
 /// </summary>
 /// <param name="source"></param>
 public Word(IEnumerable <byte> source)
 {
     foreach (byte b in source)
     {
         Length++;
         HexBytes.Add(new HexByte(b));
     }
 }
示例#2
0
 /// <summary>
 /// constructor: take a word from the enumeration @start for length bytes
 /// </summary>
 /// <param name="buffer"></param>
 /// <param name="start"></param>
 /// <param name="length"></param>
 public Word(IEnumerable <byte> buffer, int start, int length)
 {
     foreach (byte b in buffer.Skip(start).Take(length))
     {
         Length++;
         HexBytes.Add(new HexByte(b));
     }
 }