This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy


// This class contains the app's entry point



Download 21,46 Mb.
Pdf ko'rish
bet82/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   78   79   80   81   82   83   84   85   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

// This class contains the app's entry point.

class Program

{

static void Main()



{

Calc c = new Calc();

int ans = c.Add(10, 84);

Console.WriteLine("10 + 84 is {0}.", ans);

// Wait for user to press the Enter key before shutting down.

Console.ReadLine();

}

}

// The C# calculator.



class Calc

{

public int Add(int x, int y)



{ return x + y; }

}

}



Once you compile this code file using the C# compiler (csc.exe), you end up with a single-file

*.exe assembly that contains a manifest, CIL instructions, and metadata describing each aspect of

the Calc and Program classes.



Note

Chapter 2 examines the details of compiling code using the C# compiler, as well as the use of graphical

IDEs such as Visual Studio, Visual C# Express, and SharpDevelop.

For example, if you were to open this assembly using ildasm.exe (examined a little later in this

chapter), you would find that the Add() method is represented using CIL such as the following:

.method public hidebysig instance int32  Add(int32 x,

int32 y) cil managed

{

// Code size       9 (0x9)



.maxstack  2

.locals init (int32 V_0)

IL_0000:  nop

IL_0001:  ldarg.1

IL_0002:  ldarg.2

IL_0003:  add

IL_0004:  stloc.0

C H A P T E R   1  




Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   78   79   80   81   82   83   84   85   ...   1830




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