当前位置: 动力学知识库 > 问答 > 编程问答 >

.net - C# Font class design

问题描述:

Why there are no setters in Font class in .NET?

It would be so much better to be able to decrease/increase font size by simply aplying increment operators for instance font.Size++

But instead of this everytime I want to change font size or style or whatever, I have to create a new instance of the class.

网友答案:

Font class is a GDI+ wrapper. GDI+ objects don't have such operations, and thus doesn't the class Font.

You can get some knowledge here: http://msdn.microsoft.com/en-us/library/ms534437(v=vs.85).aspx

分享给朋友:
您可能感兴趣的文章:
随机阅读: