So, I am trying to create a path in C #. I use Environment.Machinename and save it with serverName variable. Then I create another string variable and have a different path extension. Here is my code:
string serverName = Environment.MachineName;
string folderName = "\\AlarmLogger";
No matter what I do, I cannot get just one backslash before AlarmLogger. Any ideas how I can point the path in C #?
Edit: I am wondering if my code wants to insert correctly. In any case, when I insert it, I only see the backslash, but I have two codes. Due to the escape character sequence. But something like
string test = @"\\" + serverName + folderName
doesn't seem to want to work for me.
Jason source
share