摘要: 一直没有弄明白ref的用法,今天用了一下msdn,发现竟然是如此的简单,用的时间要注意若要使用ref 参数,则方法定义和调用方法都必须显式使用 ref 关键字。一句话把我的迷津全部点开了例子: class RefExample { static void Method(ref int i) { // Rest the mouse pointer over i to verify that it is an int. // The following statement would cause a compiler e... 阅读全文
posted @ 2012-06-16 20:48 haiziguo 阅读(622) 评论(0) 推荐(0) 编辑