随笔分类 -  c#

写点c#方面的东西
摘要:这2天我在写一个规约程序,想将数据保存到excel文件中,1分钟存一次,从网上找到的资源都是一次生成的,没有在原来的基础上追加的模式,几经实验如下:(做个标记) 实现功能,新建立一个data.xlsx文件作为模板,放到程序同级目录下,程序会根据日期新生成文件,同一天的数据按照追加的模式写入。 //* 阅读全文
posted @ 2019-12-12 18:58 我注六经 阅读(1872) 评论(0) 推荐(0)
摘要:1.文字模式 FileStream fs = new FileStream(string.Format("{0:D3}.cfg", currentcount), FileMode.Create); //将文件名称格式化成***.cfg 格式 StreamWriter sw = new StreamW 阅读全文
posted @ 2019-12-07 17:45 我注六经 阅读(1520) 评论(0) 推荐(0)
摘要://新建一个文件对话框 OpenFileDialog pOpenFileDialog = new OpenFileDialog(); //设置对话框标题 pOpenFileDialog.Title = "打开二进制文件"; //设置打开文件类型 pOpenFileDialog.Filter = "b 阅读全文
posted @ 2019-12-07 17:41 我注六经 阅读(3001) 评论(1) 推荐(1)
摘要:先放上串口的一个类,自己编写的,觉得这样好用些。 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System 阅读全文
posted @ 2019-12-07 17:33 我注六经 阅读(2274) 评论(0) 推荐(1)