_AppDomain.SetData(String, Object) 方法

定义

为 COM 对象提供对 SetData(String, Object) 方法的与版本无关的访问。Provides COM objects with version-independent access to the SetData(String, Object) method.

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

参数

name
String

要创建或更改的用户定义应用程序域属性的名称。The name of a user-defined application domain property to create or change.

data
Object

该属性的值。The value of the property.

属性

注解

请参见AppDomain.SetData方法。See the AppDomain.SetData method.

安全性

SecurityCriticalAttribute
需要对直接调用方的完全信任。Requires full trust for the immediate caller. 部分受信任的或透明的代码不能使用此成员。This member cannot be used by partially trusted or transparent code.

适用于