导航

随笔分类 -  C#基础

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;using System.Data;using System.Data.Common;using System.Web.Script.Serialization;using System.Text.RegularExpressions;using System.Web;using Microsoft.VisualBasic;using System.Collections;using 阅读全文

posted @ 2011-07-18 17:58 kingwangzhen 阅读(495) 评论(0) 推荐(0) 编辑

摘要:http://www.cnblogs.com/webabcd/archive/2010/06/03/1750449.html 阅读全文

posted @ 2011-04-15 12:17 kingwangzhen 阅读(163) 评论(0) 推荐(0) 编辑

摘要:http://www.cnblogs.com/webabcd/archive/2007/02/04/639830.html 阅读全文

posted @ 2011-04-15 12:15 kingwangzhen 阅读(117) 评论(0) 推荐(0) 编辑

摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.OleDb;... 阅读全文

posted @ 2010-03-17 23:25 kingwangzhen 阅读(520) 评论(0) 推荐(0) 编辑

摘要:最近在做一个WinForm的项目,由于采用的是在客户端直接连接数据库的方式,需要在客户端部署App.config,由于使用了Enterprise Library,需要对App.config文件里的connectionStrings片断进行加密处理,搜索MSDN,发现已经有了现成的工具ASP.NET IIS 注册工具 (Aspnet_regiis.exe),可是它只能针对ASP.NET的Web.co... 阅读全文

posted @ 2009-12-24 22:16 kingwangzhen 阅读(705) 评论(0) 推荐(1) 编辑

摘要:String.Empty != null; 如果一个TextBox没有值的话,if(TextBox.Text == String.Empty) ==> 结果为: FALSEif(TextBox.Text == String.Empty) ==> 结果为: TRUE; 在2.0中判断字符串是否为空String.IsNullOrEmpty(str) == True 则说明字符串为空(nul... 阅读全文

posted @ 2009-12-24 14:06 kingwangzhen 阅读(275) 评论(1) 推荐(0) 编辑

摘要:http://www.cnblogs.com/davidlc/archive/2008/06/11/1217226.html 阅读全文

posted @ 2009-12-17 12:12 kingwangzhen 阅读(190) 评论(0) 推荐(0) 编辑

摘要:本技巧使用GetFolderPath方法来获取指向由指定枚举标识的系统特殊文件夹的路径。语法格式如下:public static string GetFolderPath (SpecialFolder folder)参数folder标识系统特殊文件夹的枚举常数。如果指定系统的特殊文件夹存在于用户的计算机上,则返回到该文件夹的路径;否则为空字符串("")。如果系统未创建文件夹、已删除现有文件夹或者文... 阅读全文

posted @ 2009-12-12 13:09 kingwangzhen 阅读(770) 评论(0) 推荐(0) 编辑

摘要:方法一foreach (System.Collections.DictionaryEntry de in objHasTab){ //注意HastTable内存储的默认类型是object,需要进行转换才可以输出 Console.WriteLine(de.Key.ToString()); Console.WriteLine(de.Value.ToString());}方法二System.Collec... 阅读全文

posted @ 2009-11-26 15:47 kingwangzhen 阅读(286) 评论(0) 推荐(0) 编辑

摘要:先看一个例子: ArrayListlist=newArraylist();list.Add(44);inti1=(int)list(0);foreach(inti2inlist){Console.writeLine(i2);}装箱和拆箱的操作很容易使用,但是性能损失比较大,如果要是贴袋很多项时更是如此.System.Collections.Generic命名空间中的LIst<T>类不使... 阅读全文

posted @ 2009-11-26 15:41 kingwangzhen 阅读(529) 评论(0) 推荐(2) 编辑

摘要:http://www.cnblogs.com/daniel206/archive/2008/01/16/1041745.html 阅读全文

posted @ 2009-10-30 09:53 kingwangzhen 阅读(182) 评论(0) 推荐(0) 编辑

摘要:C#回车切换焦点在WinForm和Web中实现以代替TAB键是怎么解决的呢?C#C#回车切换焦点的具体方法是什么呢?下面我们分别来看看具体的实现过程。C#回车切换焦点在WinForm中:有文本框textbox1和textbox2,现在光标在textbox1中,按回车键后怎样让光标跳至textbox2,实现tab键的功能.首先设置textBox1和textBox2的TabIndex属性,分别设置为1... 阅读全文

posted @ 2009-10-29 15:14 kingwangzhen 阅读(1056) 评论(0) 推荐(0) 编辑