C# 0 The Complete Reference



Download 4,07 Mb.
Pdf ko'rish
bet755/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   751   752   753   754   755   756   757   758   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

FixedBankRecord

 is the exact sum of its members, this may not be 

the case for all 

struct

s that have fixed-size buffers. C# is free to pad the overall length of 

structure so that it aligns on an even boundary (such as a word boundary) for efficiency 

reasons. Therefore, the overall length of a 



struct

 might be a few bytes greater than the sum 

of its fields, even when fixed-size buffers are used. In most cases, an equivalent C++ 

struct

would also use the same padding. However, be aware that a difference in this regard may 

be possible.

One last point: In the program, notice how the fixed-size buffer for 



Name

 is created:

public fixed byte Name[80]; // create a fixed-size buffer

Pay special attention to how the dimension of the array is specified. The brackets containing 

the array size follow the array name. This is C++-style syntax, and it differs from normal C# 

array declarations. This statement allocates 80 bytes of storage within each 




Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   751   752   753   754   755   756   757   758   ...   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