C# 0 The Complete Reference


Main( )  method  generates the following sequence of errors when compiled by the  csc



Download 4,07 Mb.
Pdf ko'rish
bet70/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   66   67   68   69   70   71   72   73   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

Main( )

 method 


generates the following sequence of errors when compiled by the 

csc

 command-line 

compiler. (Similar errors are generated when compiling using the IDE.)

EX1.CS(12,21): error CS1002: ; expected

EX1.CS(13,22): error CS1519: Invalid token '(' in class, struct, or

interface member declaration

EX1.CS(15,1): error CS1022: Type or namespace definition, or

end-of-file expected

Clearly, the first error message is completely wrong, because what is missing is not a 

semicolon, but a curly brace. The second two messages are equally confusing.

The point of this discussion is that when your program contains a syntax error, don’t 

necessarily take the compiler’s messages at face value. They may be misleading. You may need 

to “second guess” an error message in order to find the problem. Also, look at the last few lines 

of code immediately preceding the one in which the error was reported. Sometimes an error 

will not be reported until several lines after the point at which the error really occurred.


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   66   67   68   69   70   71   72   73   ...   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