WebThreadInformation.ThreadAccountName 属性

定义

获取线程帐户名。

public:
 property System::String ^ ThreadAccountName { System::String ^ get(); };
public string ThreadAccountName { get; }
member this.ThreadAccountName : string
Public ReadOnly Property ThreadAccountName As String

属性值

线程帐户名。

示例

下面的代码示例演示如何获取线程帐户名称。

// Get the account name.
public string GetThreadAccountName()
{
    return (string.Format(
        "Request user host address: {0}",
        ThreadInformation.ThreadAccountName));
}
' Get the account name.
Public Function GetThreadAccountName() As String
     Return String.Format( _
     "Request user host address: {0}", _
     ThreadInformation.ThreadAccountName)
End Function 'GetThreadAccountName

注解

如果线程在模拟模式下执行,则此属性返回的帐户可能是任意的。

适用于