共用方式為


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

備註

如果執行緒在模擬模式中執行,此屬性所傳回的帳戶可能是任意的。

適用於