StrongNameIdentityPermission Constructor (StrongNamePublicKeyBlob, String, Version)
Initializes a new instance of the StrongNameIdentityPermission class for the specified strong name identity.
Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)
public StrongNameIdentityPermission( StrongNamePublicKeyBlob blob, string name, Version version )
Parameters
- blob
- Type: System.Security.Permissions.StrongNamePublicKeyBlob
The public key defining the strong name identity namespace.
- name
- Type: System.String
The simple name part of the strong name identity. This corresponds to the name of the assembly.
- version
- Type: System.Version
The version number of the identity.
| Exception | Condition |
|---|---|
| ArgumentNullException | The blob parameter is null. |
| ArgumentException | The name parameter is an empty string (""). |
The name and version parameters can be null only when the public key is used to identify the assembly. An empty string ("") should not be used in place of null. If name is an empty string, an ArgumentException is thrown.
For more information on names and version numbers of assemblies, see Strong-Named Assemblies.
The following code example shows the use of the StrongNameIdentityPermission constructor.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.