如提,string a=string.Empty,与string a="",有什么区别?

解决方案 »

  1.   

    string a=string.Empty,与string a="",----------------------------
    这两个是一样的,
    因为在定义上
    String.Empty=="";
      

  2.   

    基本情况下是一样的
    Empty是静态变量,定义为""
      

  3.   

    值一样,但有性能区别参见http://codebetter.com/blogs/brendan.tompkins/archive/2003/10/14/2585.aspx
      

  4.   

    string a=string.Emptya实际上等于 nothing不站空间而=“”;
    站用空间的
      

  5.   

    to net_lover(【孟子E章】) (
    http://codebetter.com/blogs/brendan.tompkins/archive/2003/10/14/2585.aspx
    这上面的性能好象是一样的
      

  6.   

    两者一样的.是.net框架的封装.