秦风 通过本文主要向大家介绍了马桶c的个人空间,c语言,欲情 c max,维生素c,奔驰c200等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
文件创建:
System.IO.Path.GetFileName(filePath) //返回带扩展名的文件名
System.IO.Path.GetFileNameWithoutExtension(filePath) //返回不带扩展名的文件名
System.IO.Path.GetDirectoryName(filePath) //返回文件所在目录</div>
文件存在:
System.IO.DirectoryInfo info = new System.IO.DirectoryInfo(Application.StartupPath + "\\AlarmSet.txt");
MessageBox.Show(info.Exists.ToString()); </div>
是不是很简单,但有时候我们可能对GetFileNameWithoutExtension或GetDirectoryName这样的函数,感觉比较陌生,以前还总傻傻的自己写函数实现,原来就一行代码搞定啊~
</div>