語言

TypeDescriptor.GetDefaultEvent 方法

定義

回傳元件或類型的預設事件。

多載

名稱 Description
GetDefaultEvent(Object)

傳回指定元件的預設事件。

GetDefaultEvent(Type)

傳回指定元件類型的預設事件。

GetDefaultEvent(Object, Boolean)

傳回具有自定義類型描述元之元件的預設事件。

GetDefaultEvent(Object)

來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs

傳回指定元件的預設事件。

public:
 static System::ComponentModel::EventDescriptor ^ GetDefaultEvent(System::Object ^ component);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")]
public static System.ComponentModel.EventDescriptor? GetDefaultEvent(object component);
public static System.ComponentModel.EventDescriptor GetDefaultEvent(object component);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")>]
static member GetDefaultEvent : obj -> System.ComponentModel.EventDescriptor
static member GetDefaultEvent : obj -> System.ComponentModel.EventDescriptor
Public Shared Function GetDefaultEvent (component As Object) As EventDescriptor

參數

component
Object

這是你要參加活動的部分。

傳回

或 EventDescriptor 是預設事件發生,或者 null 沒有事件。

屬性

例外狀況

component 是 null。

component 是一個跨程序的遠端物件。

備註

此方法等同於帶有第二個參數 的GetDefaultEvent(Object, Boolean)超載false方法。

另請參閱

適用於

GetDefaultEvent(Type)

來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs

傳回指定元件類型的預設事件。

public:
 static System::ComponentModel::EventDescriptor ^ GetDefaultEvent(Type ^ componentType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code.")]
public static System.ComponentModel.EventDescriptor? GetDefaultEvent(Type componentType);
public static System.ComponentModel.EventDescriptor GetDefaultEvent(Type componentType);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code.")>]
static member GetDefaultEvent : Type -> System.ComponentModel.EventDescriptor
static member GetDefaultEvent : Type -> System.ComponentModel.EventDescriptor
Public Shared Function GetDefaultEvent (componentType As Type) As EventDescriptor

參數

componentType
Type

目標成分的。Type

傳回

或 EventDescriptor 是預設事件發生,或者 null 沒有事件。

屬性

例外狀況

componentType 是 null。

備註

只有在你沒有物件實例時才呼叫此方法版本。

另請參閱

適用於

GetDefaultEvent(Object, Boolean)

來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs
來源:
TypeDescriptor.cs

傳回具有自定義類型描述元之元件的預設事件。

public:
 static System::ComponentModel::EventDescriptor ^ GetDefaultEvent(System::Object ^ component, bool noCustomTypeDesc);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")]
public static System.ComponentModel.EventDescriptor? GetDefaultEvent(object component, bool noCustomTypeDesc);
public static System.ComponentModel.EventDescriptor GetDefaultEvent(object component, bool noCustomTypeDesc);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The built-in EventDescriptor implementation uses Reflection which requires unreferenced code. The Type of component cannot be statically discovered.")>]
static member GetDefaultEvent : obj * bool -> System.ComponentModel.EventDescriptor
static member GetDefaultEvent : obj * bool -> System.ComponentModel.EventDescriptor
Public Shared Function GetDefaultEvent (component As Object, noCustomTypeDesc As Boolean) As EventDescriptor

參數

component
Object

這是你要參加活動的部分。

noCustomTypeDesc
Boolean

true不考慮自訂型別描述資訊;否則,。 false

傳回

或 EventDescriptor 是預設事件發生,或者 null 沒有事件。

屬性

例外狀況

component 是 null。

component 是一個跨程序的遠端物件。

另請參閱

適用於