What is the difference between the \ and the / when doing streamwriter?
e.g.
Example 1:
Streamwriter sw = new Streamwriter("/test folder/Output/test.txt");
and
Example 2:
Streamwriter sw = new Streamwriter(@"\test folder\Output\test.txt");
I see you need the @ symbol in the front on the second example too.
There is no difference because .NET recognizes both one and the other in paths.
However, since
\has special meaning when appearing inside a string literal (it is the beginning of an escape sequence) the second example uses verbatim string literal syntax. It could have used\\in place of\instead.