c# 类型 char , string

// 创建控制台应用程序文件:MyString.cs

 

 

Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSType
{
    
public class MyString
    {
        
public MyString()
        {
            
char c = '1';
            Console.WriteLine(c.GetType());
            
//output System.Char 

            
string s = "2";
            Console.WriteLine(s.GetType());
            
//output System.String

            Console.ReadLine();
        }
    }
}

 

posted @ 2009-01-06 15:03  无尽思绪  阅读(268)  评论(0编辑  收藏  举报