C# 0 The Complete Reference


PART I C h a p t e r   6



Download 4,07 Mb.
Pdf ko'rish
bet175/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   171   172   173   174   175   176   177   178   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt


PART I

C h a p t e r   6 :  

I n t r o d u c i n g   C l a s s e s   a n d   O b j e c t s  

117


PART IPART I

and identifier pairs separated by commas. Parameters are variables that receive the value of 

the

arguments

 passed to the method when it is called. If the method has no parameters, then 

the parameter list will be empty.

Add a Method to the Building Class

As just explained, the methods of a class typically manipulate and provide access to the 

data of the class. With this in mind, recall that 

Main( )

 in the preceding examples computed 

the area-per-person by dividing the total area by the number of occupants. Although 

technically correct, this is not the best way to handle this computation. The calculation of 

area-per-person is something that is best handled by the 

Building

 class, itself. The reason 

for this conclusion is easy to understand: The area-per-person of a building is dependent 

upon the values in the 




Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   171   172   173   174   175   176   177   178   ...   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