c# - How to Store file path in asp.net MVC4 -


this question has answer here:

hi need store file path of folder on string variable in asp.net mvc 4 when i'm using following method shows error

unrecognized escape sequence

static string path="c:\path"; 

what reason of error , how can solve this????

you need escape '\' '\', so:

static string path="c:\\path"; 

or put '@' in front of so:

static string path = @"c:\path"; 

duplicate: unrecognized escape sequence path string containing backslashes

related reading: 2.4.4.5 string literals


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -