C# 0 The Complete Reference


static . A method that is modified by  static



Download 4,07 Mb.
Pdf ko'rish
bet66/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   62   63   64   65   66   67   68   69   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

static

. A method that is modified by 



static

 can be 


called before an object of its class has been created. This is necessary because 

Main( )

 is 


called at program startup. The keyword 

void

 indicates that 



Main( )

 does not return a value. 

As you will see, methods can also return values. The empty parentheses that follow 

Main

indicate that no information is passed to 



Main( )

. Although it is possible to pass information 

into

Main( )

, none is passed in this example. The last character on the line is the 



{

. This 


signals the start of 

Main( )

’s body. All of the code that comprises a method will occur 

between the method’s opening curly brace and its closing curly brace.

The next line of code is shown here. Notice that it occurs inside 



Main( )

.

Console.WriteLine("A simple C# program.");



This line outputs the string “A simple C# program.” followed by a new line on the screen. 

Output is actually accomplished by the built-in method 




Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   62   63   64   65   66   67   68   69   ...   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