Share via


Binder.SelectProperty Metode

Definisi

Memilih properti dari kumpulan properti yang diberikan, berdasarkan kriteria yang ditentukan.

public:
 abstract System::Reflection::PropertyInfo ^ SelectProperty(System::Reflection::BindingFlags bindingAttr, cli::array <System::Reflection::PropertyInfo ^> ^ match, Type ^ returnType, cli::array <Type ^> ^ indexes, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
public abstract System.Reflection.PropertyInfo? SelectProperty (System.Reflection.BindingFlags bindingAttr, System.Reflection.PropertyInfo[] match, Type? returnType, Type[]? indexes, System.Reflection.ParameterModifier[]? modifiers);
public abstract System.Reflection.PropertyInfo SelectProperty (System.Reflection.BindingFlags bindingAttr, System.Reflection.PropertyInfo[] match, Type returnType, Type[] indexes, System.Reflection.ParameterModifier[] modifiers);
abstract member SelectProperty : System.Reflection.BindingFlags * System.Reflection.PropertyInfo[] * Type * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.PropertyInfo
Public MustOverride Function SelectProperty (bindingAttr As BindingFlags, match As PropertyInfo(), returnType As Type, indexes As Type(), modifiers As ParameterModifier()) As PropertyInfo

Parameter

bindingAttr
BindingFlags

Kombinasi BindingFlags nilai bitwise.

match
PropertyInfo[]

Kumpulan properti yang merupakan kandidat untuk pencocokan. Misalnya, ketika Binder objek digunakan oleh InvokeMember, parameter ini menentukan sekumpulan properti yang refleksi telah menentukan kemungkinan kecocokan, biasanya karena mereka memiliki nama anggota yang benar. Implementasi default yang disediakan oleh DefaultBinder mengubah urutan array ini.

returnType
Type

Nilai yang dikembalikan yang harus dimiliki properti pencocokan.

indexes
Type[]

Jenis indeks properti yang sedang dicari. Digunakan untuk properti indeks seperti pengindeks untuk kelas.

modifiers
ParameterModifier[]

Array pengubah parameter yang memungkinkan pengikatan untuk bekerja dengan tanda tangan parameter tempat jenis telah dimodifikasi.

Mengembalikan

Properti yang cocok.

Pengecualian

Untuk pengikat default, match berisi beberapa properti yang sama-sama cocok untuk returnType dan indexes.

Untuk pengikat default, match adalah null atau array kosong.

Keterangan

Metode ini mengontrol pilihan yang disediakan oleh GetProperty metode pada Type.

Berlaku untuk

Lihat juga