6.5字符串的格式化

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

namespace _6._5字符串的格式化
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("{0:c}",22);



            Console.WriteLine("format格式化");
            string s = string.Format("{0:d6}",123,123.5);
            Console.WriteLine(s);
            Console.ReadLine();
        }
    }
}

猜你喜欢

转载自www.cnblogs.com/suanfa/p/12146350.html