如何从文件名中单独修剪文件扩展名? [英] how to trim the file extension alone from the filename?
本文介绍了如何从文件名中单独修剪文件扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hai,
我有一个字符串asdads.jpg,现在我只想显示不带扩展名的tat文件名,我该怎么做tat pls帮帮我...我用path.changeextension然后输出也不完美
hai,
i am having one string which is asdads.jpg ,now i want to show only tat file name without extension, how can i do tat pls help me...i used path.changeextension then also the output is not perfect
推荐答案
^ ]
使用 ^ ]和 Path.GetFileNameWithoutExtension 一个> [ ^ ]
您可以使用Path.GetFileNameWithoutExtension [
这篇关于如何从文件名中单独修剪文件扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文