LogicalCallContext.SetData(String, Object) 方法

定義

在目前執行個體中存放指定物件,並使它與指定名稱產生關聯。Stores the specified object in the current instance, and associates it with the specified name.

public:
 void SetData(System::String ^ name, System::Object ^ data);
public void SetData (string name, object data);
[System.Security.SecurityCritical]
public void SetData (string name, object data);
member this.SetData : string * obj -> unit
[<System.Security.SecurityCritical>]
member this.SetData : string * obj -> unit
Public Sub SetData (name As String, data As Object)

參數

name
String

要用來與呼叫內容中新項目相關聯的名稱。The name with which to associate the new item in the call context.

data
Object

要儲存在呼叫內容中的物件。The object to store in the call context.

屬性

適用於