随笔分类 -  C#

上一页 1 ··· 7 8 9 10 11 12 下一页
摘要:https://www.cnblogs.com/LuoEast/p/7886297.html 1.在写程序中经常操作字符串,需要去重,以前我的用方式利用List集合和 contains去重复数据代码如下: 2.现在我推荐大家使用一下方式去重复数据 阅读全文
posted @ 2018-01-19 09:54 LuoCore 阅读(410) 评论(0) 推荐(0)
摘要:byte[] Strbyte = Encoding.GetEncoding("big5").GetBytes(str); if (Strbyte.Length < len) { Strbyte = Encoding.GetEncoding("big5").GetBytes(str.PadRight( 阅读全文
posted @ 2018-01-16 18:57 LuoCore 阅读(4569) 评论(0) 推荐(0)
摘要:System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); stopwatch.Stop(); long mill = stopwatch.ElapsedMillise 阅读全文
posted @ 2018-01-15 10:51 LuoCore 阅读(156) 评论(0) 推荐(0)
摘要:今天闲来无事看到ORm的特性映射sql语句。我就想到datagridview也可以用这个来动态添加列。这样就不用每次都去界面上点开界面填列了。 代码简漏希望有人看到了能指点一二。 先定义好Datagridview要加载的列。 public class Model { [ColumnAttribute 阅读全文
posted @ 2018-01-06 14:17 LuoCore 阅读(826) 评论(3) 推荐(0)
摘要:http://www.jb51.net/article/72259.htm Datagridview添加列: ? 1 2 3 4 5 DataGridViewTextBoxColumn acCode = new DataGridViewTextBoxColumn(); acCode.Name = " 阅读全文
posted @ 2018-01-06 10:41 LuoCore 阅读(24390) 评论(1) 推荐(1)
摘要:this.dataGridView1.Columns["列名"].DisplayIndex=Convert.ToInt32("你要放置的位置") this.dataGridView1.Columns["列名"].DisplayIndex=Convert.ToInt32("你要放置的位置") 阅读全文
posted @ 2017-12-22 13:45 LuoCore 阅读(2167) 评论(0) 推荐(0)
摘要:num_length.Focus(); UpDownBase updbText = (UpDownBase)num_length; num_length.Select(0, updbText.Text.Length); 阅读全文
posted @ 2017-12-01 15:11 LuoCore 阅读(1044) 评论(0) 推荐(0)
摘要:String.Join 和 Distinct 方法 https://www.cnblogs.com/louby/p/6224960.html 1.在写程序中经常操作字符串,需要去重,以前我的用方式利用List集合和 contains去重复数据代码如下: 2.现在我推荐大家使用一下方式去重复数据 阅读全文
posted @ 2017-11-23 18:09 LuoCore 阅读(3999) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/vchenpeng/archive/2013/05/12/3074887.html /// <summary> /// 获取时间戳 /// </summary> /// <returns></returns> public static string 阅读全文
posted @ 2017-11-23 18:08 LuoCore 阅读(517) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/jyh_jack/article/details/17959821 阅读全文
posted @ 2017-11-22 16:19 LuoCore 阅读(241) 评论(0) 推荐(0)
摘要:只要把勾去掉就能查看变量的值了 阅读全文
posted @ 2017-11-15 13:04 LuoCore 阅读(1830) 评论(0) 推荐(0)
摘要:去掉勾 阅读全文
posted @ 2017-11-15 11:04 LuoCore 阅读(12287) 评论(1) 推荐(2)
摘要:http://blog.csdn.net/nidexuanzhe/article/details/8228832 说明:通常我们在做数据库交互时,并不一定要使用特定的SQL语句来更新数据,.NET Framwork为我们提供了自动更新的功能 [csharp] view plain copy publ 阅读全文
posted @ 2017-11-14 18:17 LuoCore 阅读(240) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/a312100321/article/details/25195311 问题:DataGridView绑定数据源之后,有一列需要用下拉框DataGridViewComboBoxCell显示,但是在处理DataGridViewComboBoxCell的下拉事件 阅读全文
posted @ 2017-11-13 18:35 LuoCore 阅读(9773) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/hezheqiang/article/details/51966511 我们在多线程中通常使用一个 C# 使用 CancellationTokenSource 终止线程 使用CancellationTokenSource对象需要与Task对象进行配合使用,T 阅读全文
posted @ 2017-11-08 11:04 LuoCore 阅读(2953) 评论(0) 推荐(1)
摘要:http://blog.csdn.net/xuexiaodong009/article/details/46998069 json作为作为一种最常用的数据,应用很广泛,在.net中如何把一个对象转化为json字符串呢? 主要有一下几种 1按照json的定义自己转化,难度很大,但很灵活。需要自己处理各 阅读全文
posted @ 2017-11-03 16:35 LuoCore 阅读(9158) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/lingxyd_0/article/details/43155039 一般情况下出现这样的问题是因为.dll文件不存在或者路径不正确。但今天我遇到的情况都不在这两个内。我确定.dll文件是存在的,路径也是正确的。但是程序死活都是“未能加载文件或程序集“xxx 阅读全文
posted @ 2017-11-03 15:27 LuoCore 阅读(2093) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/lvdongjie/p/5416883.html 3. 方式三:采用lambda表达式 对于lambda表达式不熟悉的可以查看微软MSDN上的说明文档。此处假设你熟悉。因为在大多数使用委托的时候我们一般也可以用lambda表达式的。 View Code 阅读全文
posted @ 2017-10-30 11:45 LuoCore 阅读(811) 评论(0) 推荐(0)
摘要:/// <summary> /// 全选中数字文本框内容 /// </summary> /// <param name="o"></param> public static void numericSelectAll(this object o) { System.Windows.Forms.Num 阅读全文
posted @ 2017-10-30 11:25 LuoCore 阅读(590) 评论(0) 推荐(0)
摘要:DateTime xxx = new DateTime(2007,1,1,21,21,21); string time = new DateTime(2007, 1, 1, 21, 21, 21).ToString("yyyy年MM月dd日 HH点mm分ss秒"); 阅读全文
posted @ 2017-10-27 17:39 LuoCore 阅读(11360) 评论(0) 推荐(0)

上一页 1 ··· 7 8 9 10 11 12 下一页