IrishChieftain
IrishChieftain

Reputation: 15253

Incorrect Shared Folder Path Being Generated

In my code:

protected readonly string DropFolder = @"\\SharedFolder\Subfolder";

In ILSpy:

protected readonly string DropFolder = "\\\\SharedFolder\\Subfolder";

Am I missing something?

Upvotes: 0

Views: 40

Answers (1)

Gabriel Negut
Gabriel Negut

Reputation: 13960

Some characters are stored as the corresponding escape sequences in CIL, and \ is one of them (stored as \\). These two strings are equal: @"\" == "\\".

Read this topic for more details.

Upvotes: 1

Related Questions