C#积累
文章平均质量分 79
欢迎学习与交流
GaoXianSheng7
这个作者很懒,什么都没留下…
展开
-
【无标题】
/// <summary> /// 调用存储过程,可等待较长时间 /// </summary> /// <exception cref="Exception"></exception> public static void Conn() { SqlConnection myConnection = new SqlConnection(@"server=.;...原创 2022-03-07 08:46:53 · 135 阅读 · 0 评论 -
winfrom窗体显示子窗体
1.创建Form1窗体,并在Load事件中设置该窗体为MDI窗体,代码如下: this.IsMdiContainer = true; 2.并添加MenuStrip控件,添加ToolStripMenuItem在事件中添加如下代码: Form2 f = new Form2 (); t.MdiParent = this; t.Show(); 2.创建Form2窗体 ...原创 2020-07-22 14:48:45 · 409 阅读 · 0 评论 -
日期格式的转化
class Program { static void Main(string[] args) { while (true) { Console.WriteLine("请输入一个日期:"); string strDate = Console.ReadLine(); string dc = Baodate2Chinese(s..原创 2020-05-27 08:12:55 · 268 阅读 · 0 评论 -
极了
----------------------------------------------------------copy string dir = "G:\\a"; string backDir = dir + "\\bak\\" + DateTime.Now.ToString("yyyy-MM-dd"); if (Directory.Exists(backDir)==false) { Direc.原创 2020-05-26 09:50:18 · 270 阅读 · 0 评论 -
C#随手笔记
select 'truncate table',name from sys.tables; //初始化所有表数据 C#winfrom实现任务栏显示图标以及右键图标显示功能。 添加notifyIcon1和contextMenuStrip1控件 notifyIcon1中contextMenuStrip1属性绑定contextMenuStrip1控件 。 ...原创 2020-01-09 08:52:28 · 216 阅读 · 0 评论 -
临时网站随时更新
vs打包程序 https://www.cnblogs.com/lxhbky/p/10695527.html http://bbs.bccn.net/thread-395296-1-1.html string stra = "abcdefghijk"; string strtempa = "c"; string strtempb = "j"; //我们要求c---g之间的字符串,也就...原创 2019-11-21 11:05:52 · 247 阅读 · 0 评论 -
C#操作Excel文件
1.NPOI无需Office COM组件且不依赖Office,使用NPOI能够帮助开发者在没有安装微软Office的情况下读写Office 97-2003的文件,支持的文件格式包括xls, doc, ppt等。NPOI是构建在POI 3.x版本之上的,它可以在没有安装Office的情况下对Word/Excel文档进行读写操作。 2. //Access链接字符串 "Provider=Micro...原创 2019-09-26 10:21:48 · 256 阅读 · 0 评论