2002-09-13 Nick Drochak <ndrochak@gol.com>
[mono.git] / mcs / class / corlib / System / Buffer.cs
index 41a4abf4fb1da7efcb9d8f447a545154a5792738..ac0209fbd3f517c0560528f4834e5a6db07089a3 100755 (executable)
@@ -29,16 +29,16 @@ namespace System {
                        return length;
                }
 
-               public static int GetByte (Array array, int index) {
+               public static byte GetByte (Array array, int index) {
                        if (index < 0 || index >= ByteLength (array))
-                               throw new ArgumentException ("Index was out of range. Must be non-negative and less than the size of the collection.");
+                               throw new ArgumentOutOfRangeException ("Index was out of range. Must be non-negative and less than the size of the collection.");
 
                        return GetByteInternal (array, index);
                }
 
                public static void SetByte (Array array, int index, byte value) {
                        if (index < 0 || index >= ByteLength (array))
-                               throw new ArgumentException ("Index was out of range. Must be non-negative and less than the size of the collection.");
+                               throw new ArgumentOutOfRangeException ("Index was out of range. Must be non-negative and less than the size of the collection.");
 
                        SetByteInternal (array, index, value);
                }