NetworkCredential Class
Represents a user name and password for network authentication.
The NetworkCredential
class is used to provide credentials for network authentication protocols such as Basic, Digest, NTLM, and Kerberos.
System.Net.Primitives
Constructors
-
NetworkCredential()
Initializes a new instance of the
NetworkCredential
class with default values. -
NetworkCredential(string userName, string password)
Initializes a new instance of the
NetworkCredential
class with the specified user name and password. -
NetworkCredential(string userName, string password, string domain)
Initializes a new instance of the
NetworkCredential
class with the specified user name, password, and domain.
Properties
-
Domain
Gets or sets the domain associated with the credential.
string Domain { get; set; }
-
Password
Gets or sets the password associated with the credential.
string Password { get; set; }
-
UserName
Gets or sets the user name associated with the credential.
string UserName { get; set; }
Methods
-
Equals(object obj)
Determines whether the specified object is equal to the current object.
bool Equals(object obj)
-
GetHashCode()
Serves as the default hash function.
int GetHashCode()
-
GetType()
Gets the type of the current instance.
Type GetType()
-
ToString()
Returns a string that represents the current object.
string ToString()