摘要: c# 获取字符串中的数字 /// /// 获取字符串中的数字 /// /// 字符串 /// 数字 public static decimal GetNumber(string str) { decimal result = 0; if (str != null && str != string.Empty) { // 正则表达式剔除非数字字符(不包含小数点.) str =... 阅读全文
posted @ 2009-11-12 16:52 独行剑 阅读(1193) 评论(0) 推荐(0) 编辑
摘要: .ArrayList类ArrayList类主要用于对一个数组中的元素进行各种处理。在ArrayList中主要使用Add、Remove、RemoveAt、Insert四个方法对栈进行操作。Add方法用于将对象添加到 ArrayList 的结尾处;Remove方法用于从 ArrayList 中移除特定对象的第一个匹配项;RemoveAt方法用于移除 ArrayList 的指定索引处的元素;Insert... 阅读全文
posted @ 2009-11-12 12:08 独行剑 阅读(3373) 评论(0) 推荐(0) 编辑
摘要: ref和out的区别在C# 中,既可以通过值也可以通过引用传递参数。通过引用传递参数允许函数成员更改参数的值,并保持该更改。若要通过引用传递参数, 可使用ref或out关键字。ref和out这两个关键字都能够提供相似的功效,其作用也很像C中的指针变量。它们的区别是:1、使用ref型参数时,传入的参数必须先被初始化。对out而言,必须在方法中对其完成初始化。 2、使用ref和out时,在方法的参数和... 阅读全文
posted @ 2009-11-12 11:23 独行剑 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 标准控件1 btn Button 2 chk CheckBox 3 ckl CheckedListBox 4 cmb ComboBox 5 dtp DateTimePicker 6 lbl Label 7 llb LinkLabel 8 lst ListBox 9 lvw ListView 10 mtx MaskedTextBox 11 cdr MonthCalendar 12 icn Notif... 阅读全文
posted @ 2009-11-12 10:01 独行剑 阅读(1370) 评论(0) 推荐(0) 编辑