/// <summary> /// Copies the entire byte array to the destination array provided at the offset specified. /// </summary> public void CopyTo(byte[] array, int position) { ByteArray.Copy(bytes, 0, array, position, bytes.Length); }
/// <summary> /// Constructs a <see cref="ByteString" /> from a portion of a byte array. /// </summary> public static ByteString CopyFrom(byte[] bytes, int offset, int count) { byte[] portion = new byte[count]; ByteArray.Copy(bytes, offset, portion, 0, count); return(new ByteString(portion)); }