using System.IO; //引入命名空间      

       string path = "text.aspx";
        string pathName = Path.GetFileName(path);      //获取文件全名 text.aspx
        string pathName1 = Paht.GetFileNameWithoutExtension(path);   //获取文件名 text
        string pathName2 = Path.GetExtension(path);   //获取文件后缀名 aspx

 

相关文章:

  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案