The other way to escape characters is the @ symbol.
For example from
http://www.softsteel.co.uk/tutorials/cSharp/lesson4.html
The second approach is to use 'verbatim string'
literals. These are defined by enclosing the required
string in the characters @" and ". To illustrate this,
to set the variable 'path' to the following value:
we could either escape the back-slash characters
string path = "C:\\My Documents\\"
or use a verbatim string thus:
string path = @"C:\MyDocuments\"
Good luck,
JDK
Milsnips wrote:
aah yes thats it - the backslash was missing!
15-Mar-07
aah yes thats it - the backslash was missing! thanks
Paul
Previous Posts In This Thread:
how to remove " character from string in c#?
Hi there
i've tried the following
string s = myString.Replace(""","");... but the compiler just doesnt like
it
So, if there is a " in the string of text, i'd like to remove it
any help appreciated
thanks
Paul
Re: how to remove " character from string in c#?
string s = myString.Replace("\"","")
VJ
RE: how to remove " character from string in c#?
If you are using C# the following is what you would need to do
string s = myString.Replace("\"","")
It requires an escape to recognize the quote
Cheers
Ro
:
aah yes thats it - the backslash was missing!
aah yes thats it - the backslash was missing! thanks
Paul
Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Report Engine, Part 2
http://www.eggheadcafe.com/tutorial...c9-cf3a9ee210a7/wpf-report-engine-part-2.aspx