21 private static int _defaultBlockLength = 10 * 1024 * 1024;
23 public static int DefaultBlockLength {
24 get {
return _defaultBlockLength; }
27 throw new ArgumentOutOfRangeException(
"value",
"Minimum DefaultBlockLength value is 1024kb (1024*1024).");
29 _defaultBlockLength = value;
35 throw new ArgumentNullException(
"source");
37 if (sourceIndex < 0 || sourceIndex >= source.Length)
38 throw new ArgumentOutOfRangeException(
"sourceIndex");
41 throw new ArgumentNullException(
"dest");
43 if (destIndex < 0 || destIndex >= dest.Length)
44 throw new ArgumentOutOfRangeException(
"destIndex");
46 if (destIndex + count >= dest.Length)
47 throw new ArgumentException(
"Cannot copy over the maximum destination capacity");
49 for (var i = 0; i < count; i++) {
50 dest[destIndex + i] = source[sourceIndex + i];