G
Guest
Hello,
I do not have any trouble declaring string values except when it comes to
directory path's. Why does C# implicitly put a @ symbol at the being of a
String value that has been declared like this:
string strSourceDirectory="C:\\Documents and Settings\\admin\\My
Documents\\Excel\\Excel\\";
The value that strSourceDirectory gets assigned is:
@"C:\Documents and Settings\admin\My Documents\Excel\Excel\"
How do I get around this because my program errors out, because the
directory path in strSourceDirectory that I am assigning to a specific
document I want to open does not exist?
Here is the acutal error I get:
@"'C:\Documents and Settings\admin\My
Documents\Excel\Excel\TEST200609050.csv' is not a valid path. Make sure that
the path name is spelled correctly and that you are connected to the server
on which the file resides."
Thanks,
I do not have any trouble declaring string values except when it comes to
directory path's. Why does C# implicitly put a @ symbol at the being of a
String value that has been declared like this:
string strSourceDirectory="C:\\Documents and Settings\\admin\\My
Documents\\Excel\\Excel\\";
The value that strSourceDirectory gets assigned is:
@"C:\Documents and Settings\admin\My Documents\Excel\Excel\"
How do I get around this because my program errors out, because the
directory path in strSourceDirectory that I am assigning to a specific
document I want to open does not exist?
Here is the acutal error I get:
@"'C:\Documents and Settings\admin\My
Documents\Excel\Excel\TEST200609050.csv' is not a valid path. Make sure that
the path name is spelled correctly and that you are connected to the server
on which the file resides."
Thanks,