随笔分类 -  C#开发

摘要:注意table 列的参数类型,若不为string 需要详细声明 如 typeof(Int32) public static IList<T> ConvertTo<T>(DataTable dt) where T : new() { IList<T> list = new List<T>(); if 阅读全文
posted @ 2019-06-20 23:00 ......正在输入中 阅读(199) 评论(0) 推荐(0)
摘要:添加类: public class JsonDataTimeConverter:IsoDateTimeConverter { public JsonDataTimeConverter() { DateTimeFormat = "yyyy-MM-dd HH:mm:ss"; } public overr 阅读全文
posted @ 2019-03-18 10:39 ......正在输入中 阅读(493) 评论(0) 推荐(0)
摘要:获取当前程序所在路径文件1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName-获取模块的完整路径。 2. System.Environment.CurrentDirectory-获取和设置当前目录(该进程从中启动的 阅读全文
posted @ 2017-06-24 23:05 ......正在输入中 阅读(311) 评论(0) 推荐(0)
摘要:1.Image 转 byte[] public byte[] GetByteByImage(Image image) { byte[] bt = null; try { if (!image.Equals(null)) { MemoryStream ms = new MemoryStream(); 阅读全文
posted @ 2017-04-17 17:03 ......正在输入中 阅读(728) 评论(0) 推荐(0)
摘要:using System.Diagnostics; public static void StartCmd(String command){Process p = new Process();p.StartInfo.FileName = "cmd.exe"; //命令p.StartInfo.UseS 阅读全文
posted @ 2017-02-19 22:08 ......正在输入中 阅读(3557) 评论(0) 推荐(0)