使用指定的现有类型和事件名称初始化 EventIdentifier 类的新实例。
命名空间:  Microsoft.Windows.Design.Metadata
程序集:  Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)
语法
声明
Public Sub New ( _
    declaringType As Type, _
    name As String _
)
public EventIdentifier(
    Type declaringType,
    string name
)
public:
EventIdentifier(
    Type^ declaringType, 
    String^ name
)
new : 
        declaringType:Type * 
        name:string -> EventIdentifier
public function EventIdentifier(
    declaringType : Type, 
    name : String
)
参数
- declaringType
 类型:System.Type
 在其上声明该事件的类型。
- name
 类型:System.String
 事件的名称。
异常
| 异常 | 条件 | 
|---|---|
| ArgumentNullException | declaringType 或 name 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 | 
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。