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



Download 21,46 Mb.
Pdf ko'rish
bet208/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   204   205   206   207   208   209   210   211   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

Defining Verbatim Strings

When you prefix a string literal with the @ symbol, you have created what is termed a verbatim

string. Using verbatim strings, you disable the processing of a literal’s escape characters and print

out a string as is. This can be most useful when working with strings representing directory and

network paths. Therefore, rather than making use of \\ escape characters, you can simply write the

following:



// The following string is printed verbatim

// thus, all escape characters are displayed.

Console.WriteLine(@"C:\MyApp\bin\Debug");

Also note that verbatim strings can be used to preserve white space for strings that flow over

multiple lines:



// White space is preserved with verbatim strings.

string myLongString = @"This is a very

very

very


long string";

Console.WriteLine(myLongString);

Using verbatim strings, you can also directly insert a double quote into a literal string by

doubling the " token, for example:

Console.WriteLine(@"Cerebus said ""Darrr! Pret-ty sun-sets""");

Figure 3-11 shows the result of invoking EscapeChars().



Figure 3-11.

Escape characters and verbatim strings in action

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



90

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





Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   204   205   206   207   208   209   210   211   ...   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