C# 0 The Complete Reference


PART I C h a p t e r   3



Download 4,07 Mb.
Pdf ko'rish
bet101/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   97   98   99   100   101   102   103   104   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt


PART I

C h a p t e r   3 :  

D a t a   T y p e s ,   L i t e r a l s ,   a n d   V a r i a b l e s  

49

PART IPART I



  static void Main() {

    Console.WriteLine(@"This is a verbatim

string literal

that spans several lines.

");

    Console.WriteLine(@"Here is some tabbed output:



1       2       3       4

5       6       7       8

");

    Console.WriteLine(@"Programmers say, ""I like C#.""");



  }

}

The output from this program is shown here:



This is a verbatim

string literal

that spans several lines.

Here is some tabbed output:

1       2       3       4

5       6       7       8

Programmers say, "I like C#."

The important point to notice about the preceding program is that the verbatim string 

literals are displayed precisely as they are entered into the program.

The advantage of verbatim string literals is that you can specify output in your program 

exactly as it will appear on the screen. However, in the case of multiline strings, the 

wrapping will obscure the indentation of your program. For this reason, the programs in 

this book will make only limited use of verbatim string literals. That said, they are still a 

wonderful benefit for many formatting situations.

One last point: Don’t confuse strings with characters. A character literal, such as 'X', 

represents a single letter of type 



char

. A string containing only one letter, such as "X", is still

a string.


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   97   98   99   100   101   102   103   104   ...   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