Property Grid Number formatting
问题 Is it possible to format numerical properties displayed in PropertyGrid of winforms? class MyData { public int MyProp {get; set;} } And I want it to be displayed in the grid as 1.000.000 for example. Are there some attributes for this? 回答1: You should implement custom type converter for your integer property: class MyData { [TypeConverter(typeof(CustomNumberTypeConverter))] public int MyProp { get; set; } } PropertyGrid uses TypeConverter to convert your object type (integer in this case) to