`

StrChTest

    博客分类:
  • C#
阅读更多
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 类

诚品服饰 英伦男装 无条件退换
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics