NetworkCredential.Domain Property


Gets or sets the domain or computer name that verifies the credentials.

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

member Domain : string with get, set

Property Value

Type: System.String

The name of the domain associated with the credentials.

The Domain property specifies the domain or realm to which the user name belongs. Typically, this is the host computer name where the application runs or the user domain for the currently logged in user.

The following code example uses the Domain property to set the domain associated with the credentials.

No code example is currently available or this language may not be supported.


to get the system domain. Associated enumeration: EnvironmentPermissionAccess.Read

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