-5

Possible Duplicate:
@(at) sign in file path/string

in C# for example this function you can use @"stringpath" instead of "stringpath"

Why should I add an @ there in front? I get the same results without using @??

example:

UploadFileMethod(@"C:\test.txt", @"http://site.com/bla/file.txt");

public static bool UploadFileToDocumentLibrary(string sourceFilePath, string targetDocumentLibraryPath)

{
//stuff here
}
Community
  • 1
  • 1
Rob
  • 3,556
  • 2
  • 34
  • 53

1 Answers1

1

It changes the escaping behavior of strings. When using @ we don't need to escape \ character.

As the path should be in this manner:

"C:\\abc.txt"

Vishal Suthar
  • 17,013
  • 3
  • 59
  • 105