01 2020 档案

摘要:/// /// 转换成时间 00:00:00/// /// /// public string time(long duration){ TimeSpan t = new TimeSpan(0, 0, Convert.ToInt32(duration)); //string str = "00:00:00"; return $"{t.Hours:00}:{t.Minutes:... 阅读全文
posted @ 2020-01-11 17:02 XE2011 阅读(1127) 评论(0) 推荐(1) 编辑
摘要:像sql数据链接字符串不能出现的特殊字符 单引号‘、双引号“、斜杠\、大于号>、 " 编码后 [ə'prɑksɪmət] < > "通过使用 HttpUtility类 实现上面2种编码与转换//需要引用using System.Web;//解码textBox1.Text = HttpUtility.HtmlEncode(textBox1.Text);//编码text... 阅读全文
posted @ 2020-01-10 12:15 XE2011 阅读(844) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections;using System.Linq;namespace ConsoleApp1 { class Program { static void Main(string[] args) { string[] array = { "a.m.", "a", "Smith", "Jones",... 阅读全文
posted @ 2020-01-09 18:20 XE2011 阅读(1326) 评论(0) 推荐(0) 编辑
摘要:2020年1月9日 17:50:55附件https://files.cnblogs.com/files/xe2011/ListBoxSort.rar这种方法 如果内容足够多就能看到滚动条闪烁了,我觉得这是列表框清除内容,再添加内容引起的。用不删除列表,重新赋值的方法能解释闪烁,但过程时间又太长。using System;using System.Collections.Generic;using ... 阅读全文
posted @ 2020-01-09 17:53 XE2011 阅读(475) 评论(0) 推荐(0) 编辑
摘要:string s = "";foreach (DataGridViewRow item in dataGridView1.Rows) { s += item.Cells["单词"].FormattedValue + "\n";}MessageBox.Show(s);为什么不用for呢 因foreach快string s = "";for (int i = 0; i < dataGridVie... 阅读全文
posted @ 2020-01-07 16:38 XE2011 阅读(3603) 评论(0) 推荐(1) 编辑
摘要:treeView1.SelectedNode.Level获取 TreeView 控件中的树视图的深度(从零开始)。Level对于属性,根节点被视为第一级嵌套,并返回0。 //判断这个按钮可不可以使用toolStripButton1.Enabled = treeView1.SelectedNode != null && treeView1.SelectedNode.Level != 0;//我不愿意... 阅读全文
posted @ 2020-01-07 16:04 XE2011 阅读(878) 评论(0) 推荐(0) 编辑
摘要:https://files-cdn.cnblogs.com/files/xe2011/ListBoxDemo202013181554.rar public partial class Form1 : Form { public Form1() { InitializeComponent(); } ListStri... 阅读全文
posted @ 2020-01-03 18:21 XE2011 阅读(167) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示