C# 0 The Complete Reference


goto  statement—it is not necessary  for making the language complete. Rather,  goto



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

goto

 statement—it is not necessary 

for making the language complete. Rather, 

goto

 is a convenience that, if used wisely, can be 

a benefit in certain programming situations. As such, the 

goto

 is not used in this book 

outside of this section. The chief concern most programmers have about the 

goto

 is its 


tendency to clutter a program and render it nearly unreadable. However, there are times 

when the use of the 



goto

 can clarify program flow rather than confuse it.

The

goto

 requires a label for operation. A 



label

 is a valid C# identifier followed by a 

colon. The label must be in the same method as the 

goto

 that uses it and within scope. For 

example, a loop from 1 to 100 could be written using a 

goto

 and a label, as shown here:

x = 1;

loop1:


  x++;

  if(x < 100) goto loop1;

www.freepdf-books.com



106

 

P a r t   I :  



T h e   C #   L a n g u a g e

The



Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   158   159   160   161   162   163   164   165   ...   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