且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Windows窗体和对象方向

更新时间:2023-12-06 13:29:10

根据定义,C#始终为OO.但是,与Java中的代码相同,由您决定编写好的代码.如果将所有代码都放在表单中,那么它不是很面向对象.如果创建业务逻辑类,则可以以更有序的方式进行分解.除非需要自定义控件,否则无需创建用户控件,也无需将多个控件组合到一个控件中以进行重用.
C# is, by definition, always OO. But, it''s up to you to write good code, same as it was in Java. If you put all your code inside your form, then it''s not very OO. If you create business logic classes, then you can factor things out in a more orderly fashion. There''s no need to create user controls unless you need a custom control, or to group several controls together into a single control for reuse.