摘要:
1,Directory,File与DirectoryInfo,FileInfo类的比较 Directory与File类: 只包含静态方法,从不能被实例化 DirectoryInfo与FileInfo类:非静态,需要实例化 两个在实现的公共方法上大致相同 File,FileInfo的很多方法通常以流的方式返回数据 2,Path类:包含一些静态方法,用于辅助处理路径的操作 3,无法直接... 阅读全文
摘要:
1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4 取当前日 int 日=curre... 阅读全文