Click here to Skip to main content
16,017,448 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi. I am a big fun of object oriented programming. I have been using Java in the past. And I used to make fully object oriented console applications. Now, I am using C# to create Windows Forms application. But I'm finding it hard to make a clean object oriented programming. Everything seems to be coded right into the form. And this is not a good practice, as I know.

Some one told me to use User Control along Windows forms to make a clean and more flexible coding but it seems there are few things written about this even on MSDN.

Any useful link on how to design user interface that adheres to object oriented programming principles in C#?

Thanks in advance.
Posted

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900