From 160c57fb827df51a4a425c0078fe266ecca435cf Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 3 Apr 2019 22:03:36 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/CookieCollection.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/Net/CookieCollection.cs b/websocket-sharp/Net/CookieCollection.cs index 48433495..d0a05e0a 100644 --- a/websocket-sharp/Net/CookieCollection.cs +++ b/websocket-sharp/Net/CookieCollection.cs @@ -610,9 +610,10 @@ namespace WebSocketSharp.Net if (index < 0) throw new ArgumentOutOfRangeException ("index", "Less than zero."); - if (array.Length - index < _list.Count) - throw new ArgumentException ( - "The number of elements in this collection is greater than the available space of the destination array."); + if (array.Length - index < _list.Count) { + var msg = "The available space of the destination array is not enough."; + throw new ArgumentException (msg); + } _list.CopyTo (array, index); }