String

 

 

strAppDir = Path.GetDirectoryName(

                       

 

Assembly.GetExecutingAssembly().GetName().CodeBase);

           

 

String strFullPathToMyFile = Path.Combine(strAppDir, "fileName.txt");

           

 

Console.WriteLine(String.Format("Path to the application is: '{0}'." +

               

 

"Full path to the file in the application folder is: '{1}'",

                strAppDir, strFullPathToMyFile));

相关文章:

  • 2021-10-21
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-08-09
  • 2021-12-17
猜你喜欢
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案