Export (0) Print
Expand All

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.

ExceptionCondition
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.

snIdPerm1 = new StrongNameIdentityPermission(blob, "MyCompany.MyDepartment.*", new Version("1.0.0.0"));

.NET Framework

Supported in: 4.6, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, 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.

Show:
© 2014 Microsoft