C# 0 The Complete Reference


PART I C h a p t e r   1 2



Download 4,07 Mb.
Pdf ko'rish
bet421/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   417   418   419   420   421   422   423   424   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt


PART I

C h a p t e r   1 2 :  

I n t e r f a c e s ,   S t r u c t u r e s ,   a n d   E n u m e r a t i o n s  

327


PART IPART I

struct 


name

 : 


interfaces

 {

   // member declarations



}

The name of the structure is specified by 



name.

Structures cannot inherit other structures or classes or be used as a base for other 

structures or classes. (Of course, like all C# types, structures do inherit 

object

.) However, a 

structure can implement one or more interfaces. These are specified after the structure name 

using a comma-separated list. Like classes, structure members include methods, fields, 

indexers, properties, operator methods, and events. Structures can also define constructors, 

but not destructors. However, you cannot define a default (parameterless) constructor for a 

structure. The reason for this is that a default constructor is automatically defined for all 

structures, and this default constructor can’t be changed. The default constructor initializes 

the fields of a structure to their default value. Since structures do not support inheritance, 

structure members cannot be specified as 




Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   417   418   419   420   421   422   423   424   ...   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