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.

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

.NET Framework
Available since 1.1
Return to top
Show: