string & String

来源:互联网 发布:恒腾网络集团张继文 编辑:程序博客网 时间:2024/05/16 18:09
 
To referencethe string type in programs, we can have several choices:
1.    including a “using System”
/* String */
Using System;

public class stringExample1
{
    
static void Main()
    
{
        String vv 
= "I’m a string!";
    }

}

2.    No “using ” directive included
/* System.String */
// No "using" directive needed!
public class stringExample2
{
    
static void Main()
    
{
        System.String vv 
= "I’m a string too!";
    }

}

3.    No “using ” directive included
/* string */
// No "using" directive needed!
public class stringExample3
{
    
static void Main()
    
{
        
string vv = "I’m the simplest string!";
    }

}

 

 
原创粉丝点击