NTAccount Constructor (String, String)
.NET Framework (current version)
Initializes a new instance of the NTAccount class by using the specified domain name and account name.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- domainName
-
Type:
System.String
The name of the domain. This parameter can be null or an empty string. Domain names that are null values are treated like an empty string.
- accountName
-
Type:
System.String
The name of the account. This parameter cannot be null or an empty string.
| Exception | Condition |
|---|---|
| ArgumentNullException | accountName is null. |
| ArgumentException | accountName is an empty string. -or- accountName is too long. -or- domainName is too long. |
The specified domain and account names are not required to correspond to an existing account or group, but translation into other IdentityReference-derived types will not be possible unless the account or group does exist.
.NET Framework
Available since 2.0
Available since 2.0
Show: