[RESOLVED] Special characters in a sting object
Hi,
How can I create a string that includes the " character (i.e. a string within a string, sort of)?
as in:
strmwriter.WriteLine("CD "C:\Program Files\Cubist"");
thanks.
[201 byte] By [
tamaro] at [2007-11-20 1:38:34]

# 1 Re: [RESOLVED] Special characters in a sting object
With escape sequence \" :
strmwriter.WriteLine("CD \"C:\Program Files\Cubist\"");
# 2 Re: [RESOLVED] Special characters in a sting object
With escape sequence \" :
strmwriter.WriteLine("CD \"C:\Program Files\Cubist\"");
strmwriter.WriteLine("CD \"C:\\Program Files\\Cubist\"");
Fixed! :) I guess it isn't possible to use @ when you need to escape quotations?
# 3 Re: [RESOLVED] Special characters in a sting object
That is right , you can't use @ here and, as you fixed what I forgot, he needs to escape \ too .