Home > Net >  Consult a formatted string
Consult a formatted string

Time:01-09

Int myInt=500
Console. WriteLIne ($" Value: {myInt: C} ")
And
Console. WriteLIne ($" Value: ${myInt} ")
What's the difference?

CodePudding user response:

C said: according to the currency (usd) format output
$is a string. The fromat of syntactic sugar, can refer to https://www.cnblogs.com/net-sky/p/10250880.html
  •  Tags:  
  • C#
  • Related