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();
        }
    }
}
posted @ 2020-01-03 18:45  zhzy123  阅读(118)  评论(0)    收藏  举报