In my opinion, partial classes frowned a bit on professional developers, but I ran into a problem:
I made an implementation of the RichTextBox control, which uses user32.dll calls to edit large texts more quickly. This leads to quite a lot of code. Then I added the spelling checker controls, this was done in another class that inherits the RichTextBox control. It also makes up some code.
These two functions are quite different, but I would like them to be combined so that I can remove one control in my form that has both quick editing and spell checking capabilities. I feel that just adding the code form of one class to another will lead to a too large code file, especially since there are two very different areas of functionality, so I seem to need a different approach.
Now to my question; To combine these two classes, I have to make RichTextBox spell check inherit from quick editing, which in turn inherits RichTextBox? Or should I make two classes partial for one class and thereby make them more "equal", so to speak?
This is more about OO principles and an exercise on my part than about trying to reinvent the wheel; I know that there are many good text editing tools. But this is just a hobby for me, and I just want to know how this decision will be managed by a professional.
Thanks!
source share