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)
{
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top