摘要: string pLocalFilePath ="";//要复制的文件路径 string pSaveFilePath ="";//指定存储的路径 if (File.Exists(pLocalFilePath))//必须判断要复制的文件是否存在 { File.Copy(pLocalFilePath, pSaveFilePath, true);//三个参数分别是源文件路径,存储路径,若存储路径有相同文件 阅读全文
posted @ 2019-09-01 11:03 饮木 阅读(18014) 评论(0) 推荐(2)
摘要: private string GetWeek() { string week = string.Empty; switch ((int)DateTime.Now.DayOfWeek) { case 0: week = "星期日";... 阅读全文
posted @ 2019-08-13 11:09 饮木 阅读(11088) 评论(0) 推荐(1)
摘要: private void aa() { System.Drawing.Printing.PrintDocument print = new System.Drawing.Printing.PrintDocument(); string sDefault = print.PrinterSettings.PrinterName;//默认... 阅读全文
posted @ 2019-07-30 09:22 饮木 阅读(2504) 评论(0) 推荐(0)
摘要: static void Main(string[] args) { string filePath = @"e:\test\abc.jpg"; Console.WriteLine(Path.GetFullPath(filePath)); //--> E:\test\abc.jpg Console.Wri... 阅读全文
posted @ 2019-07-22 20:39 饮木 阅读(10942) 评论(0) 推荐(1)
摘要: 第一种: 第二种: 阅读全文
posted @ 2019-07-22 20:28 饮木 阅读(111251) 评论(8) 推荐(4)
摘要: for /l %%i in (1,1,10) do @echo %%ipause 阅读全文
posted @ 2019-07-17 14:27 饮木 阅读(1705) 评论(0) 推荐(0)
摘要: /// /// 获得pc号 /// public static string GetPcsnString() { var pcsn = ""; try { var search = new Manage... 阅读全文
posted @ 2019-06-24 16:59 饮木 阅读(774) 评论(0) 推荐(0)
摘要: 1、增加字段(修改表)alter table 表名 ADD 字段 类型 NOT NULL Default 0 阅读全文
posted @ 2019-06-24 11:50 饮木 阅读(144) 评论(0) 推荐(0)
摘要: string l_strResult = 你的字符串.Replace("\n", "").Replace(" ","").Replace("\t","").Replace("\r",""); 阅读全文
posted @ 2019-06-24 11:49 饮木 阅读(15968) 评论(0) 推荐(1)
摘要: string数组 string[] s1 = new string[3] { "John", "Paul", "Mary" }; string[] s1 = new string[3] { "John", "Paul", "Mary" }; if (s1.Contains("John")) if ( 阅读全文
posted @ 2019-06-24 10:48 饮木 阅读(2785) 评论(0) 推荐(0)