Skip to main content
 首页 » 编程设计

c#之什么{1 :C} in C# mean when found inside a string

2024年02月13日14小虾米

例如,

Console.WriteLine("{0}\n earned:{1:C}\n". salariedEmployee, salariedEmployee.earnings()); 

我发现以前的问题解释了 {0} 的含义。但是,它没有解释 {1:C} 的含义。

请您参考如下方法:

格式说明符 {1:C} 表示货币。

引用: