This documentation is archived and is not being maintained.

GenericPrincipal Constructor

Initializes a new instance of the GenericPrincipal class from a GenericIdentity and an array of role names to which the user represented by that GenericIdentity belongs.

[Visual Basic]
Public Sub New( _
   ByVal identity As IIdentity, _
   ByVal roles() As String _
)
[C#]
public GenericPrincipal(
   IIdentity identity,
 string[] roles
);
[C++]
public: GenericPrincipal(
   IIdentity* identity,
 String* roles __gc[]
);
[JScript]
public function GenericPrincipal(
   identity : IIdentity,
 roles : String[]
);

Parameters

identity
A basic implementation of IIdentity that represents any user.
roles
An array of role names to which the user represented by the identity parameter belongs.

Exceptions

Exception Type Condition
ArgumentNullException The identity parameter is a null reference (Nothing in Visual Basic).

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

GenericPrincipal Class | GenericPrincipal Members | System.Security.Principal Namespace

Show: