![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
.NET
文章平均质量分 61
skywshing
这个作者很懒,什么都没留下…
展开
-
C#中static关键字的用法
>>>以下转自百度知道静态分配的,有两种情况:1. 用在类里的属性、方法前面,这样的静态属性与方法不需要创建实例就能访问, 通过类名或对象名都能访问它,静态属性、方法只有“一份”:即如果一个类新建有N个 对象,这N 个对象只有同一个静态属性与方法;2. 方法内部的静态变量: 方法内部的静态变量,执行完静态变量值不消失,再次执行此对象的方法时,值仍存在, 它不是在转载 2013-03-18 20:31:35 · 426 阅读 · 0 评论 -
c#.net常用函数和方法集
c#.net常用函数和方法集 1、DateTime 数字型 System.DateTime currentTime=newSystem.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=转载 2014-06-27 17:51:56 · 366 阅读 · 0 评论 -
C# 判断字符串是全角或半角
C#字符串的全角是指用二个字节来表示的一个字符C#字符串的半角是用一个字节来表示的一个字符这样的话我们就可以用string.length 和System.text.Encoding.Default.GetByteCount来判断其中string.length表示C#字符串字符串的字符数,System.text.Encoding.Default.Get原创 2014-06-27 17:00:45 · 1005 阅读 · 0 评论 -
C#中删除控件的事件的方法类
方法一:转载 2014-06-28 17:49:39 · 1181 阅读 · 0 评论 -
C# 控件名称缩写建议
控件名称缩写介绍公共控件 Buttonbtn按钮CheckBoxchk复选框CheckedListBoxckl显示一个项列表,其中每一项左侧都有一个复选框ComboBox转载 2014-06-27 18:43:44 · 704 阅读 · 0 评论 -
C#开发使用的几个技巧
1.怎样定制VC#DataGrid列标题? DataGridTableStyle dgts = new DataGridTableStyle(); dgts.MappingName = "myTable"; //myTable为要载入数据的DataTable DataGridTextBoxColumn dgcs = newDataGridTextB转载 2014-06-27 18:01:28 · 365 阅读 · 0 评论 -
C#算法之冒泡排序实例
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication3{ class Program { static void Main(string[] args) {转载 2014-06-27 17:23:09 · 367 阅读 · 0 评论 -
C#调用win32 API读写INI文件
[C#]讀寫INI檔 Win32 APIINI 檔案,格式如下:[Section1] key1=value1 key2=value2 [Section2] key1=value1 key2=value2使用Win32 API 程式畫面程式碼Form類別using System; using System.IO; using S转载 2014-06-27 18:07:58 · 675 阅读 · 0 评论 -
C# 多线程协同完成一个任务
C# 多线程协同完成一个任务voodooer 于 星期日, 02/03/2014 - 18:30 提交view sourceprint?01using System;02using System.Collections.Generic;转载 2014-06-25 23:07:26 · 649 阅读 · 0 评论 -
C#算法学习-->递归
示例:计算数组{1,1,2,3,5,8……} 第30位值1)不用递归static void Main(string[] args){ int[] num=new int[30]; num[0]=1; num[1]=1; int first=num[0]; int second=num[1]; for (int i = 2;转载 2013-11-10 22:37:20 · 756 阅读 · 0 评论 -
C#使用ListView动态添加数据屏幕闪烁的解决方法之一
方法:开启ListView双缓存 1.自定义一个类CustomListView,继承自 System.Windows.Forms.ListViewpublic CustomListView(){ SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); Up转载 2013-07-03 23:22:54 · 1474 阅读 · 0 评论 -
Queue插入的时候报错的处理方法:源数组长度不足。请检查 srcIndex 和长度以及数组的下限
与多线程并发操作Queue有关!1)如果你用的是System.Collection.Queue集合,插入队列时123456System.Collection.Queue q = new System.Collection.Queue();//锁定队列集合,然后插入lock (q.SyncRo转载 2014-10-22 12:45:17 · 5712 阅读 · 0 评论