C# 0 The Complete Reference


Building . A class



Download 4,07 Mb.
Pdf ko'rish
bet165/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   161   162   163   164   165   166   167   168   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

Building

.

A



class

 definition creates a new data type. In this case, the new data type is called 



Building

. You will use this name to declare objects of type 



Building

. Remember that a 



class

declaration is only a type description; it does not create an actual object. Thus, the preceding 

code does not cause any objects of type 

Building

 to come into existence.

To actually create a 

Building

 object, you will use a statement like the following:

Building house = new Building(); // create an object of type building

After this statement executes, 



house

 will be an instance of 



Building

. Thus, it will have 

“physical” reality. For the moment, don’t worry about the details of this statement.

Each time you create an instance of a class, you are creating an object that contains its 

own copy of each instance variable defined by the class. Thus, every 

Building

 object will 

contain its own copies of the instance variables 


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   161   162   163   164   165   166   167   168   ...   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