最佳答案
这段代码来自 Charles Pettzold 的“编程 Windows 第六版”一书:
public object Convert(object value, Type targetType, object parameter, string language)
{
return ((double)value).ToString("N0");
}
ToString("N0")
应该使用逗号分隔符而不是小数点来打印值。我在文档中找不到关于适当的 ToString
重载和 "N0"
格式的参考资料。请给我指出正确的位置。NET 文档。