Please help to put directory path to app.config file!
//DirectoryInfo di = new DirectoryInfo(" C:\\Vicky Development\\Fu ndExplorer\
\Index\\Copy of IntlIndex");
//string dipath = @"C:\Vicky Development\Fun dExplorer\Index \Copy of
IntlIndex";
//DirectoryInfo di = new DirectoryInfo(d ipath);
System.Configur ation.AppSettin gsReader appReader =
new System.Configur ation.AppSettin gsReader();
string diPath = (string)appRead er.GetValue(
"DirectoryPath" ,typeof(string) );
DirectoryInfo di = new DirectoryInfo(d iPath);
// Get a reference to each file in that directory.
FileInfo[] fiArr = di.GetFiles();
----------------------------------------------------------
in app.config file, it looks like below, it seems complain "\\" or @
Could anyone help what should be the right syntax?
Thanks a lot!
----------------------------------------------------------------
<add key="DirectoryP ath" value=@"C:\Vick ydDevelopment\F undExplorer\Ind ex\
Copy of IntlIndex"; />
--
Message posted via http://www.dotnetmonster.com