C# 如何在c语言中同时在文本框中输入(逗号)和(点)#
我想知道如何同时在文本框中输入C# 如何在c语言中同时在文本框中输入(逗号)和(点)#,c#,textbox,decimal,comma,C#,Textbox,Decimal,Comma,我想知道如何同时在文本框中输入、和 ex) 非常感谢请使用String.Format,例如: // Output will be 555,448,999.513 string s = string.Format(new CultureInfo("en-US"), "{0:n3}", 555448999.513); 使用String.Format执行此操作,例如: // Output will be 555,448,999.513 string s = string.Format(new Cul
、
和
ex)
非常感谢请使用String.Format,例如:
// Output will be 555,448,999.513
string s = string.Format(new CultureInfo("en-US"), "{0:n3}", 555448999.513);
使用String.Format执行此操作,例如:
// Output will be 555,448,999.513
string s = string.Format(new CultureInfo("en-US"), "{0:n3}", 555448999.513);
String.Format的另一种显示方式,以及。没有文化信息
decimal v = 123018401398.313m;
Console.WriteLine(string.Format("{0:0,000.00}", v));
// Output is 123,018,401,398.31
请注意,您需要指定十进制计数。此示例仅显示2。要显示的String.Format的另一种方式,以及。没有文化信息
decimal v = 123018401398.313m;
Console.WriteLine(string.Format("{0:0,000.00}", v));
// Output is 123,018,401,398.31
请注意,您需要指定十进制计数。本例仅显示2。您的输入是什么?放置逗号和点的条件是什么?您的输入是什么?放置逗号和点的条件是什么