[Modify] Polish it
This commit is contained in:
parent
3949292fbe
commit
160c57fb82
@ -610,9 +610,10 @@ namespace WebSocketSharp.Net
|
|||||||
if (index < 0)
|
if (index < 0)
|
||||||
throw new ArgumentOutOfRangeException ("index", "Less than zero.");
|
throw new ArgumentOutOfRangeException ("index", "Less than zero.");
|
||||||
|
|
||||||
if (array.Length - index < _list.Count)
|
if (array.Length - index < _list.Count) {
|
||||||
throw new ArgumentException (
|
var msg = "The available space of the destination array is not enough.";
|
||||||
"The number of elements in this collection is greater than the available space of the destination array.");
|
throw new ArgumentException (msg);
|
||||||
|
}
|
||||||
|
|
||||||
_list.CopyTo (array, index);
|
_list.CopyTo (array, index);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user