This documentation is archived and is not being maintained.

GenericIdentity.GenericIdentity(String) Constructor

Initializes a new instance of the GenericIdentity class representing the user with the specified name.

Namespace: System.Security.Principal
Assembly: mscorlib (in mscorlib.dll)

public GenericIdentity (
	string name
)
public GenericIdentity (
	String name
)
public function GenericIdentity (
	name : String
)
Not applicable.

Parameters

name

The name of the user on whose behalf the code is running.

Exception typeCondition

ArgumentNullException

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

The following code shows the use of the GenericIdentity constructor. This code example is part of a larger example provided for the GenericIdentity class.

GenericIdentity defaultIdentity = new GenericIdentity("DefaultUser");

GenericIdentity defaultIdentity = new GenericIdentity("DefaultUser");

Windows Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: