<PackageReference Include="System.Security.Cryptography.Pkcs" Version="10.0.11" />

System.Security.Cryptography.Pkcs.SubjectIdentifier

public sealed class SubjectIdentifier
The SubjectIdentifier class defines the type of the identifier of a subject, such as a CmsSigner or a CmsRecipient. The subject can be identified by the certificate issuer and serial number or the subject key.
public SubjectIdentifierType Type { get; }

The Type property retrieves the type of subject identifier. The subject can be identified by the certificate issuer and serial number or the subject key.

public object Value { get; }

The Value property retrieves the value of the subject identifier. Use the Type property to determine the type of subject identifier, and use the Value property to retrieve the corresponding value.

public bool MatchesCertificate(X509Certificate2 certificate)

Verifies if the specified certificate's subject identifier matches current subject identifier instance.