summary refs log tree commit diff
path: root/crypto/src/asn1/Asn1EncodableVector.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-02-17 17:58:20 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-02-17 17:58:20 +0700
commite3d12a2c33a7a9d0f371e1d5ff07f7ab7a3eb7ae (patch)
treea0a855afdfbfe6a4cc8a5b026f9b815ee7147d4b /crypto/src/asn1/Asn1EncodableVector.cs
parentRefactoring in Cms (diff)
downloadBouncyCastle.NET-ed25519-e3d12a2c33a7a9d0f371e1d5ff07f7ab7a3eb7ae.tar.xz
Refactoring around Asn1EncodableVector
Diffstat (limited to 'crypto/src/asn1/Asn1EncodableVector.cs')
-rw-r--r--crypto/src/asn1/Asn1EncodableVector.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/crypto/src/asn1/Asn1EncodableVector.cs b/crypto/src/asn1/Asn1EncodableVector.cs
index bf8d324ad..2bf1cf8e2 100644
--- a/crypto/src/asn1/Asn1EncodableVector.cs
+++ b/crypto/src/asn1/Asn1EncodableVector.cs
@@ -35,7 +35,7 @@ namespace Org.BouncyCastle.Asn1
         public Asn1EncodableVector(int initialCapacity)
         {
             if (initialCapacity < 0)
-                throw new ArgumentException("must not be negative", "initialCapacity");
+                throw new ArgumentException("must not be negative", nameof(initialCapacity));
 
             this.elements = (initialCapacity == 0) ? EmptyElements : new Asn1Encodable[initialCapacity];
             this.elementCount = 0;
@@ -64,7 +64,7 @@ namespace Org.BouncyCastle.Asn1
         public void Add(Asn1Encodable element)
         {
             if (null == element)
-                throw new ArgumentNullException("element");
+                throw new ArgumentNullException(nameof(element));
 
             int capacity = elements.Length;
             int minCapacity = elementCount + 1;
@@ -144,7 +144,7 @@ namespace Org.BouncyCastle.Asn1
         public void AddAll(Asn1EncodableVector other)
         {
             if (null == other)
-                throw new ArgumentNullException("other");
+                throw new ArgumentNullException(nameof(other));
 
             int otherElementCount = other.Count;
             if (otherElementCount < 1)
@@ -182,10 +182,7 @@ namespace Org.BouncyCastle.Asn1
             }
         }
 
-        public int Count
-        {
-            get { return elementCount; }
-        }
+        public int Count => elementCount;
 
         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
         {