如何在c#windows应用程序中删除文件夹中不需要的文件?

如何在c#windows应用程序中删除文件夹中不需要的文件?

问题描述:

早上好每一个



我创建了windows c#application ..因为有一个文件夹我用这个来保存一些文件.. 。当我保存文件时,它还会创建其他文件...我想删除其他文件,如.doc,.dwg文件......



如何我可以删除该文件夹中不需要的文件吗?

good morning every one

i''m created windows c# application.. in that having a folder i''m using this to save some files...when i''m saving files it create other files also... i want to delete that other files like .doc,.dwg files...

how can i delete the unwanted files in that folder?

使用 File.Delete 方法 [ ^ ]。