/// <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)); } }
/// <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)); } }