SPManagedAccount.Username Property
Gets or sets the username.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Property Username As String
Get
Set
'Usage
Dim instance As SPManagedAccount
Dim value As String
value = instance.Username
instance.Username = value
public string Username { get; set; }
Property Value
Type: System.String
A String identifying the user.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | The set accessor was called more than once. |
SPException | The value is not a valid account. |
Remarks
The set accessor for this property can be called only once. After that, attempts to call the set accessor will throw InvalidOperationException.