摘要: Workbook book = new Workbook(path); WorksheetCollection myColection = book.Worksheets; int k1 = myColection.Count; string[] name = new string[k1]; for 阅读全文
posted @ 2021-01-29 17:33 越吃越瘦 阅读(215) 评论(0) 推荐(0) 编辑
摘要: static class Program { /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { try { //处理未捕获的异常 Application.SetUnhandledException 阅读全文
posted @ 2021-01-29 17:25 越吃越瘦 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 读取全部文件: StreamReader f2 = new StreamReader(Path, Encoding.Default); string s = f2.ReadToEnd(); 一行行读取文件: using (StreamReader sr = new StreamReader(full 阅读全文
posted @ 2021-01-29 15:42 越吃越瘦 阅读(59) 评论(0) 推荐(0) 编辑
摘要: public static string UnZipFile(string TargetFile, string EndFile) { try { using (FileStream fs = File.Create(EndFile)) { //读取压缩文件(zip文件),准备解压缩 ZipInpu 阅读全文
posted @ 2021-01-29 15:40 越吃越瘦 阅读(331) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { callMethod(); //Console.WriteLine("接口访问开始"); //string s = testreturn(); //Console.WriteLine(s); //Me 阅读全文
posted @ 2021-01-29 15:04 越吃越瘦 阅读(29) 评论(0) 推荐(0) 编辑
摘要: winform窗体文件中时常需要选择文件及文件存储位置 选择文件 System.Windows.Forms.OpenFileDialog fd = new OpenFileDialog(); fd.Title = "选择文件";//选择框名称 fd.Filter = "xls files (*.xl 阅读全文
posted @ 2021-01-29 11:46 越吃越瘦 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 在winform多线程中,新创建的线程无法访问UI线程创建的窗口控件,设置构造函数 private void Form1_Load(object sender, EventArgs e) { Control.CheckForIllegalCrossThreadCalls = false; } 或 F 阅读全文
posted @ 2021-01-29 10:53 越吃越瘦 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Type.Items.Clear(); if (Product.Text == "光模块") { Type.Items.Add("100G QSFP28 SR4"); Type.Items.Add("100G QSFP28 SR4(旧)"); Type.Items.Add("56G SR4"); T 阅读全文
posted @ 2021-01-29 10:40 越吃越瘦 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 有时候,数据采集样式各异,其中有些数据生成的json字段层层嵌套,有遇到一个复杂json格式,记录一下 1 { 2 "success": true, 3 "data": [ 4 { 5 "Column": [ 6 { 7 "categories": ["2011", "2012","2013","2 阅读全文
posted @ 2021-01-29 10:28 越吃越瘦 阅读(564) 评论(0) 推荐(0) 编辑
摘要: 在网上找了许多办法,去修改权限新建用户Everyone只读,查看Web.Config文件等都尝试没有用。后面看到一篇文章说是安装IIS的时候,没有勾上ASP.NET引起的,按照他说的解决了问题: 在控制面板—>程序—>启用或关闭windows功能—>Internet Infomation Servi 阅读全文
posted @ 2020-06-23 10:27 越吃越瘦 阅读(673) 评论(0) 推荐(1) 编辑