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


// This constructor takes (year, month, day)



Download 21,46 Mb.
Pdf ko'rish
bet216/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   212   213   214   215   216   217   218   219   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

// This constructor takes (year, month, day)

DateTime dt = new DateTime(2004, 10, 17);



// What day of the month is this?

Console.WriteLine("The day of {0} is {1}", dt.Date, dt.DayOfWeek);

dt = dt.AddMonths(2);  // Month is now December.

Console.WriteLine("Daylight savings: {0}", dt.IsDaylightSavingTime());

The TimeSpan structure allows you to easily define and transform units of time using various

members, for example:



// This constructor takes (hours, minutes, seconds)

TimeSpan ts = new TimeSpan(4, 30, 0);

Console.WriteLine(ts);

// Subtract 15 minutes from the current TimeSpan and

// print the result.

Console.WriteLine(ts.Subtract(new TimeSpan(0, 15, 0)));

At this point, I hope you understand that each data type keyword of C# has a corresponding

type in the .NET base class libraries, each of which exposes a fixed functionality. While I have not

detailed each member of these core types, you are in a great position to dig into the details as you

see fit. Be sure to consult the .NET Framework 3.5 SDK documentation for full details regarding the

intrinsic .NET data types.

C H A P T E R   3  



C O R E   C #   P R O G R A M M I N G   C O N S T R U C T S, PA RT   I



94

8849CH03.qxd  9/24/07  11:07 AM  Page 94





Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   212   213   214   215   216   217   218   219   ...   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