Click or drag to resize

WindowsUtilitiesGetUserName Method

Gets the name of the user or other security principal associated with the calling thread. You can specify the format of the returned name. If the thread is impersonating a client, GetUserName returns the name of the client.

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static string GetUserName(
	NameFormat format,
	bool throwOnError = true
)

Parameters

format
Type: callback.ShellBoost.Core.UtilitiesNameFormat
The format of the name. If the user account is not in a domain, only SamCompatible is supported.
throwOnError (Optional)
Type: SystemBoolean
true to throw error; otherwise false.

Return Value

Type: String
The name in the specified format.
See Also