summary refs log tree commit diff
path: root/crypto/src/util/collections/ReadOnlyList.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/util/collections/ReadOnlyList.cs')
-rw-r--r--crypto/src/util/collections/ReadOnlyList.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/src/util/collections/ReadOnlyList.cs b/crypto/src/util/collections/ReadOnlyList.cs
index 707c73bfd..c4d367c47 100644
--- a/crypto/src/util/collections/ReadOnlyList.cs
+++ b/crypto/src/util/collections/ReadOnlyList.cs
@@ -25,10 +25,10 @@ namespace Org.BouncyCastle.Utilities.Collections
         public bool Remove(T item) => throw new NotSupportedException();
         public void RemoveAt(int index) => throw new NotSupportedException();
 
-        public abstract int Count { get; }
 
         public abstract bool Contains(T item);
         public abstract void CopyTo(T[] array, int arrayIndex);
+        public abstract int Count { get; }
         public abstract IEnumerator<T> GetEnumerator();
         public abstract int IndexOf(T item);
 
@@ -42,6 +42,9 @@ namespace Org.BouncyCastle.Utilities.Collections
 
         internal ReadOnlyListProxy(IList<T> target)
         {
+            if (target == null)
+                throw new ArgumentNullException(nameof(target));
+
             m_target = target;
         }