达内郑州中心官方博客

 

2012年2月24日

C#引用类型参数中ref的使用

摘要: C#引用类型参数中ref的使用 众所周知,引用有class,object,string,delegate,,interface。按道理说引用类型作为参数的时候是引用传递值的。最近写程序的时候无意中发现 引用类型 作为参数的时候,加上ref 与不加ref是有区别的。以下以class类型 作为测试:测试代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ public class Test { private string 阅读全文

posted @ 2012-02-24 14:46 达内郑州中心官方博客 阅读(267) 评论(1) 推荐(0)

导航