NetworkCredential Constructor (String^, String^, String^)

 

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

Namespace:   System.Net
Assembly:  System (in System.dll)

public:
NetworkCredential(
	String^ userName,
	String^ password,
	String^ domain
)

Parameters

userName
Type: System::String^

The user name associated with the credentials.

password
Type: System::String^

The password for the user name associated with the credentials.

domain
Type: System::String^

The domain associated with these credentials.

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

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: