在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1 using System; 2 using System.IO; 3 4 namespace ConsoleApplication1 5 { 6 class Program 7 { 8 static void Main(string[] args) 9 { 10 string path1 = @"E:\uniuProject5.6.2\art\UnityArt(u3d5.6.2)\Assets\Cloth\FBX\Character\Models"; 11 string path2 = @"E:\uniuProject5.6.2\art\UnityArt(u3d5.6.2)\Assets\Cloth\FBX"; 12 string path3 = @"E:\uniuProject5.6.2\art\UnityArt(u3d5.6.2)"; 13 string path4 = @"E:\uniuProject5.6.2\art\UnityArt(u3d5.6)lklk"; 14 15 Console.WriteLine(Path.GetFileNameWithoutExtension(path1)); 16 Console.WriteLine(Path.GetFileNameWithoutExtension(path2)); 17 Console.WriteLine(Path.GetFileNameWithoutExtension(path3)); 18 Console.WriteLine(Path.GetFileNameWithoutExtension(path4)); 19 20 Console.ReadKey(); 21 } 22 } 23 } 打印结果: |
请发表评论