I have always worked in VB but recently inherited a C# application. I decided not to convert it so that I can become familiar with C#. I have an issue using the Path.Combine method in that it seems to add an extraneous "@" character at the beginning of the string which throws off an error in Windows since there is no path that begins with "@". Here is the code:
state.ReportDir = Path.Combine(ConfigurationSettings.AppSettings["ReportsFolder"], state.ReportCode);
I confirmed using breakpoints that the value of ConfigurationSettings.AppSettings["ReportsFolder"] is "templates" and the value of state.ReportCode is "month", so the concatenated string (state.ReportDir) should be "templates\month". Instead it is @"templates\month" and I have no idea where the "@" is coming from.
state.ReportDir = Path.Combine(ConfigurationSettings.AppSettings["ReportsFolder"], state.ReportCode);
I confirmed using breakpoints that the value of ConfigurationSettings.AppSettings["ReportsFolder"] is "templates" and the value of state.ReportCode is "month", so the concatenated string (state.ReportDir) should be "templates\month". Instead it is @"templates\month" and I have no idea where the "@" is coming from.