Skip to main content

NetworkCredential Class

Namespace: System.Net · Assembly: GHIElectronics.TinyCLR.Networking.Http

Class that keeps user name and password.

public class NetworkCredential

Constructors

NetworkCredential()

public NetworkCredential()

Construct class with empty user name and password

NetworkCredential(string userName, string password)

public NetworkCredential(string userName, string password) : this(userName, password, AuthenticationType.Basic)

Constructs credientials and initializes them by provided user name and pssword

ParameterTypeDescription
userNamestring
passwordstring

NetworkCredential(string userName, string password, AuthenticationType authenticationType)

public NetworkCredential(string userName, string password, AuthenticationType authenticationType)

Initializes a new instance of the NetworkCredential class.

ParameterTypeDescription
userNamestringName of the user.
passwordstringThe password.
authenticationTypeAuthenticationTypeType of the authentication.

Properties

UserName

public string UserName { get; set; }

Set or get user name.

Password

public string Password { get; set; }

Set or get password.

AuthenticationType

public AuthenticationType AuthenticationType { get; set; }

Gets or sets the type of the authentication.