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 _
public NetworkCredential(
   string userName,
 string password,
 string domain
public: NetworkCredential(
   String* userName,
 String* password,
 String* domain
public function NetworkCredential(
   userName : String,
 password : String,
 domain : String


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


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.


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