TypeDescriptor.GetDefaultProperty 方法

定義

回傳元件的預設屬性。

多載

名稱 Description
GetDefaultProperty(Type)

傳回指定之元件類型的預設屬性。

GetDefaultProperty(Object, Boolean)

傳回具有自定義型別描述元之指定元件的預設屬性。

GetDefaultProperty(Object)

傳回指定元件的預設屬性。

GetDefaultProperty(Type)

傳回指定之元件類型的預設屬性。

public:
 static System::ComponentModel::PropertyDescriptor ^ GetDefaultProperty(Type ^ componentType);
public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(Type componentType);
static member GetDefaultProperty : Type -> System.ComponentModel.PropertyDescriptor
Public Shared Function GetDefaultProperty (componentType As Type) As PropertyDescriptor

參數

componentType
Type

Type A代表要取得該財產的類別。

傳回

PropertyDescriptor A 是預設屬性,或者null如果沒有屬性。

備註

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

若參數 componentTypenull,此方法返回 null

另請參閱

適用於

GetDefaultProperty(Object, Boolean)

傳回具有自定義型別描述元之指定元件的預設屬性。

public:
 static System::ComponentModel::PropertyDescriptor ^ GetDefaultProperty(System::Object ^ component, bool noCustomTypeDesc);
public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(object component, bool noCustomTypeDesc);
static member GetDefaultProperty : obj * bool -> System.ComponentModel.PropertyDescriptor
Public Shared Function GetDefaultProperty (component As Object, noCustomTypeDesc As Boolean) As PropertyDescriptor

參數

component
Object

要取得預設屬性的元件。

noCustomTypeDesc
Boolean

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

傳回

PropertyDescriptor A 是預設屬性,或者null如果沒有屬性。

例外狀況

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

備註

若參數 componentnull,此方法返回 null

另請參閱

適用於

GetDefaultProperty(Object)

傳回指定元件的預設屬性。

public:
 static System::ComponentModel::PropertyDescriptor ^ GetDefaultProperty(System::Object ^ component);
public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(object component);
static member GetDefaultProperty : obj -> System.ComponentModel.PropertyDescriptor
Public Shared Function GetDefaultProperty (component As Object) As PropertyDescriptor

參數

component
Object

要取得預設屬性的元件。

傳回

PropertyDescriptor A 是預設屬性,或者null如果沒有屬性。

例外狀況

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

備註

若參數 componentnull,此方法返回 null

另請參閱

適用於