This documentation is archived and is not being maintained.

NetworkCredential Constructor (String, String, String)

.NET Framework 1.1

Initializes a new instance of the NetworkCredential class with the specified user name, password, and domain.

[Visual Basic]
Public Sub New( _
   ByVal userName As String, _
   ByVal password As String, _
   ByVal domain As String _
)
[C#]
public NetworkCredential(
   string userName,
 string password,
 string domain
);
[C++]
public: NetworkCredential(
   String* userName,
 String* password,
 String* domain
);
[JScript]
public function NetworkCredential(
   userName : String,
 password : String,
 domain : String
);

Parameters

userName
The user name associated with the credentials.
password
The password for the user name associated with the credentials.
domain
The domain associated with these credentials.

Remarks

The constructor initializes a NetworkCredential instance with the UserName property set to userName, the Password property set to password, and the Domain property set to domain.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

NetworkCredential Class | NetworkCredential Members | System.Net Namespace | NetworkCredential Constructor Overload List

Show: