Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Validates the provider and user string values. If these strings are valid, this method concatenates the provider and user values in order, with a colon (":") between them, and returns the concatenated string.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function FormatAccountName ( _
provider As String, _
user As String _
) As String
'Usage
Dim provider As String
Dim user As String
Dim returnValue As String
returnValue = SPUtility.FormatAccountName(provider, _
user)
public static string FormatAccountName(
string provider,
string user
)
Parameters
provider
Type: System.StringA string that provides the name of the provider.
user
Type: System.StringA string that provides the user name.
Return value
Type: System.String
A concatenation of the provider and user strings, in order, separated by a colon (":").
Remarks
If either of the provider or user values is empty or null, this method throws an exception of ArgumentNullException. If the provider string contains a colon (":"), this method throws an error of System.ArgumentException.