本文介绍了Windows清理学术项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿伙计们请我指导开发此桌面应用程序,该应用程序清除临时文件cookie和Internet历史记录.
hey guys plz guide me to develop this desktop application which clears temporary files cookies and internet history
推荐答案
public void CleanComp()
{
DirectoryInfo ICache = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache));
foreach (FileInfo ICFiles in ICache.GetFiles())
ICFiles.Delete();
DirectoryInfo IHistory = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.History));
foreach (FileInfo IHistoryFiles in IHistory.GetFiles())
IHistoryFiles.Delete();
DirectoryInfo ICookies = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.Cookies));
foreach (FileInfo ICookiesFiles in ICookies.GetFiles())
ICookiesFiles.Delete();
}
这篇关于Windows清理学术项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!