예제 #1
0
 /// <summary>
 /// Constructs a 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));
 }
예제 #2
0
 /// <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);
 }
예제 #3
0
 public static ByteString CopyFrom(byte[] bytes, int offset, int count)
 {
     byte[] dst = new byte[count];
     ByteArray.Copy(bytes, offset, dst, 0, count);
     return(new ByteString(dst));
 }