संपादित करें

इसके माध्यम से साझा किया गया


_Type.GetProperties Method

Definition

Provides COM objects with version-independent access to the GetProperties method.

Overloads

GetProperties()

Provides COM objects with version-independent access to the GetProperties() method.

GetProperties(BindingFlags)

Provides COM objects with version-independent access to the GetProperties(BindingFlags) method.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetProperties method gets the properties of the current Type.

GetProperties()

Provides COM objects with version-independent access to the GetProperties() method.

public:
 cli::array <System::Reflection::PropertyInfo ^> ^ GetProperties();
public System.Reflection.PropertyInfo[] GetProperties ();
abstract member GetProperties : unit -> System.Reflection.PropertyInfo[]
Public Function GetProperties () As PropertyInfo()

Returns

An array of PropertyInfo objects representing all public properties of the current Type.

-or-

An empty array of type PropertyInfo, if the current Type does not have public properties.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetProperties method returns all the public properties of the current Type.

Applies to

GetProperties(BindingFlags)

Provides COM objects with version-independent access to the GetProperties(BindingFlags) method.

public:
 cli::array <System::Reflection::PropertyInfo ^> ^ GetProperties(System::Reflection::BindingFlags bindingAttr);
public System.Reflection.PropertyInfo[] GetProperties (System.Reflection.BindingFlags bindingAttr);
abstract member GetProperties : System.Reflection.BindingFlags -> System.Reflection.PropertyInfo[]
Public Function GetProperties (bindingAttr As BindingFlags) As PropertyInfo()

Parameters

bindingAttr
BindingFlags

A bitmask comprised of one or more BindingFlags that specify how the search is conducted.

-or-

Zero, to return null.

Returns

An array of PropertyInfo objects representing all properties of the current Type that match the specified binding constraints.

-or-

An empty array of type PropertyInfo, if the current Type does not have properties, or if none of the properties match the binding constraints.

Remarks

This method is for access to managed classes from unmanaged code, and should not be called from managed code.

The Type.GetProperties method searches for the properties of the current Type, using the specified binding constraints.

Applies to