Inheritance

  • Thread starter Thread starter Vlado B.
  • Start date Start date
V

Vlado B.

Hi everyone!

Is there a way to inherit the
System.ComponentModel.Design.CollectionEditor.CollectionForm form?

So, something like:

public class MyCollectionEditorForm :
System.ComponentModel.Design.CollectionEditor.CollectionForm
{
}


TIA,

Vlado
 
hi you can't simply inherit from this class because as you see ot is
protected inside the CollectionEditor class.
However you can still inherit it if you follow their pattern


public class Foo: System.ComponentModel.Design.CollectionEditor
{
protected class Bar:
System.ComponentModel.Design.CollectionEditor.CollectionForm
{
public Bar(Foo editor):base(editor)
{
}
}

public Foo( Type type):base(type)
{
}
}
 
Back
Top