@个符号是做什么用的啊?
string fullpath = @"http://quote.yahoo.com/d/quotes.csv?s="+symbol+"&f=sl1d1t1c1ohgvj1pp2owern&e=.csv"; 问题点数:0、回复次数:8Top
1 楼JensiaTsang(文正)回复于 2003-07-04 08:54:00 得分 0
將后的"http://quote.yahoo.com/d/quotes.csv?s="+symbol+"&f=sl1d1t1c1ohgvj1pp2owern&e=.csv"; 這一串變為字符串.
如果不加@,如果字符串里有轉義符的話,可能會出錯.
Top
2 楼why168()回复于 2003-07-04 10:17:55 得分 0
如果没有@符号,就必须用转换符,看c的转换符Top
3 楼lovered()回复于 2003-07-04 10:27:16 得分 0
例:@"C:\temp\test" == "C:\\temp\\test"Top
4 楼lifeis(新鲜苏果)回复于 2003-07-04 13:05:37 得分 0
@-quoted string literals start with @ and are enclosed in double quotation marks. For example:
@"good morning" // a string literal
The advantage of @-quoting is that escape sequences are not processed, which makes it easy to write, for example, a fully qualified file name:
@"c:\Docs\Source\a.txt" // rather than "c:\\Docs\\Source\\a.txt"
To include a double quotation mark in an @-quoted string, double it:
@"""Ahoy!"" cried the captain." // "Ahoy!" cried the captain.
Top
5 楼look4u(努力为明天)回复于 2003-07-04 15:44:56 得分 0
省去转义字符,来晚了Top
6 楼jackiedlh(我思考,我存在)回复于 2003-07-06 16:07:15 得分 0
这么热闹Top
7 楼LiSDN(shit)回复于 2003-07-06 18:23:48 得分 0
字符串哦Top
8 楼tianwan(天玩)回复于 2003-07-07 17:23:08 得分 0
@表示该行的字符串没有结束,下面的为续行Top




