ITeye博客

StrChTest

kanglecjr · 2009-07-06 10:47 · C# · C · Linq · C++ · C# · Markdown


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

namespace StrChTest
{
    class Program
    {
        static void Main(string[] args)
        {
            char c;
            string str, s;
            c = 'I';
            str = "you and ";
            s = " are friends";
            str = str + c;  // 字符串 加 字符
            Console.WriteLine("str={0}", str); 
            str = str + s;  // 字符串 加 字符串
            Console.WriteLine("str={0}", str);

            str = Convert.ToString(c); // 将 字符 转换为 字符串
            Console.WriteLine("str={0}", str);
            Console.ReadKey();
        }
    }
}


要点: Convert 类

诚品服饰 英伦男装 无条件退换

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。