summary refs log tree commit diff
path: root/crypto/src/asn1/cms/Evidence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/cms/Evidence.cs')
-rw-r--r--crypto/src/asn1/cms/Evidence.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/asn1/cms/Evidence.cs b/crypto/src/asn1/cms/Evidence.cs
index b12f090a9..2e39054d6 100644
--- a/crypto/src/asn1/cms/Evidence.cs
+++ b/crypto/src/asn1/cms/Evidence.cs
@@ -37,11 +37,11 @@ namespace Org.BouncyCastle.Asn1.Cms
 
 		public static Evidence GetInstance(object obj)
 		{
-			if (obj is Evidence)
-				return (Evidence)obj;
+			if (obj is Evidence evidence)
+				return evidence;
 
-			if (obj is Asn1TaggedObject)
-				return new Evidence(Asn1TaggedObject.GetInstance(obj));
+			if (obj is Asn1TaggedObject taggedObject)
+				return new Evidence(taggedObject);
 
 			throw new ArgumentException("Unknown object in GetInstance: " + Platform.GetTypeName(obj), "obj");
 		}