ComponentEventArgs 类
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
public ref class ComponentEventArgs : EventArgs
C#
public class ComponentEventArgs : EventArgs
C#
[System.Runtime.InteropServices.ComVisible(true)]
public class ComponentEventArgs : EventArgs
type ComponentEventArgs = class
inherit EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type ComponentEventArgs = class
inherit EventArgs
Public Class ComponentEventArgs
Inherits EventArgs
- 继承
- 属性
以下示例演示如何创建 ComponentEventArgs。
public:
// This example method creates a ComponentEventArgs using the specified argument.
// Typically, this type of event args is created by a design mode subsystem.
ComponentEventArgs^ CreateComponentEventArgs( IComponent^ component )
{
// The component that is related to the event: args.Component
return gcnew ComponentEventArgs( component );
}
C#
// This example method creates a ComponentEventArgs using the specified argument.
// Typically, this type of event args is created by a design mode subsystem.
public ComponentEventArgs CreateComponentEventArgs(IComponent component)
{
ComponentEventArgs args = new ComponentEventArgs(component);
// The component that is related to the event: args.Component
return args;
}
' This example method creates a ComponentEventArgs using the specified argument.
' Typically, this type of event args is created by a design mode subsystem.
Public Function CreateComponentEventArgs(ByVal component As IComponent) As ComponentEventArgs
Dim args As New ComponentEventArgs(component)
' The component that is related to the event: args.Component
Return args
End Function
ComponentEventArgs 是所有组件管理事件的根事件参数类。 使用设计器添加或删除组件时,会发生此类型的事件。
Component |
初始化 ComponentEventArgs 类的新实例。 |
Component |
获取与该事件关联的组件。 |
Equals(Object) |
确定指定对象是否等于当前对象。 (继承自 Object) |
Get |
作为默认哈希函数。 (继承自 Object) |
Get |
获取当前实例的 Type。 (继承自 Object) |
Memberwise |
创建当前 Object 的浅表副本。 (继承自 Object) |
To |
返回表示当前对象的字符串。 (继承自 Object) |
产品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |