This documentation is archived and is not being maintained.

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
)
public StrongNameIdentityPermission (
	StrongNamePublicKeyBlob blob, 
	String name, 
	Version version
)
public function StrongNameIdentityPermission (
	blob : StrongNamePublicKeyBlob, 
	name : String, 
	version : Version
)

Parameters

blob

The public key defining the strong name identity namespace.

name

The simple name part of the strong name identity. This corresponds to the name of the assembly.

version

The version number of the identity.

Exception typeCondition

ArgumentNullException

The blob parameter is a null reference (Nothing in Visual Basic).

ArgumentException

The name parameter is an empty string ("").

The name and version parameters can be a null reference (Nothing in Visual Basic) only when the public key is used to identify the assembly. An empty string ("") should not be used in place of a null reference (Nothing in Visual Basic). 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"));

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: