Well, yes, that is true. But this is an extremely simplistic example. And even if your class starts out like this, then it will probably not stay like that.
Example: Change the default font size of your textbox. Just doing that is fairly lengthy...
Markus
>
>Bonnie, can you tell me why you see a problem in having base classes in different files? Serious question.<>
>John,
>
>OK, fair enough ...
>
>In the example I mentioned ... the main sub-class of your basic controls ... TextBox, ComboBox, etc. You'll not have much code in each one of these. I can't see having a whole file for, say, a Label sub-class. Here's our label class:
>
> public class MyLabel : System.Windows.Forms.Label
> {
> public MyLabel()
> {
> }
>
> #region Methods
> public virtual void DataBind(System.Data.DataTable Data, string Path)
> {
> for (int i = 0; i < this.DataBindings.Count; i++)
> {
> if (this.DataBindings[i].PropertyName == "Text")
> {
> this.DataBindings.Remove(this.DataBindings[i]);
> break;
> }
> }
> this.DataBindings.Add("Text", Data, Path);
> }
> #endregion
> }
>
>
>I can't justify having one file that contains only that.
>
>~~Bonnie