C# 0 The Complete Reference



Download 4,07 Mb.
Pdf ko'rish
bet587/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   583   584   585   586   587   588   589   590   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

GetParameters( )

 and stored in the 



pi

 array. Then a 



for

 loop cycles through the 



pi

 array, 


displaying the type and name of each parameter. The key point is that this information 

is obtained dynamically at runtime without relying on prior knowledge of 



MyClass

.

A Second Form of GetMethods

( )

A second form of 



GetMethods( )

 lets you specify various flags that filter the methods that 

are retrieved. It has this general form:

MethodInfo[ ] GetMethods(BindingFlags 



fl ags

)

This version obtains only those methods that match the criteria you specify. 



BindingFlags

 is 


an enumeration. Here are several commonly used values:

Value


Meaning

DeclaredOnly

Retrieves only those methods defined by the specified class. Inherited 

methods are not included.

Instance

Retrieves instance methods.

NonPublic

Retrieves nonpublic methods.

Public

Retrieves public methods.



Static

Retrieves 

static

 methods.



You can OR together two or more flags. In fact, minimally you must include either 


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   583   584   585   586   587   588   589   590   ...   1096




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish