摘要: Class aa { public aa() public void kk() { } } class D : IDisposable { void IDisposable.Dispose() { } public void Dispose() { } public static void Main() { using (D d = new D()) { } // Dmust be Disposa... 阅读全文
posted @ 2010-04-20 23:39 greencolor 阅读(100) 评论(0) 推荐(0) 编辑
摘要: params: no need initialization, use variables as parametersclass App { public static void UseParams(params object[] list) { for (int i = 0; i < list.Length; i++) { Console.WriteLine(list[i]); } } s... 阅读全文
posted @ 2010-04-20 22:27 greencolor 阅读(158) 评论(0) 推荐(0) 编辑
摘要: error CS0227: Unsafe code may only appear if compiling with /unsafe要在vs.net中使用unsafe code, 必须在项目的属性中设置一下,设置方法如下:点项目属性->配置属性->生成->常规中:允许不安全代码(钩上) 阅读全文
posted @ 2010-04-20 16:29 greencolor 阅读(274) 评论(0) 推荐(0) 编辑
摘要: Convert ComboBoxItem into Class array, which contains different class type public class ComboBoxItem<T> { private string _itemText; public string ItemText { get { return _itemText; } set { _ite... 阅读全文
posted @ 2010-04-20 16:04 greencolor 阅读(300) 评论(0) 推荐(0) 编辑