One year after a similare question has been posted on SO. Generic Windows Form Template
Do you know if there're a better way to make a windows form generic, here's what I'd like to do:
public partial class EntryPointEditForm<T> : Form where T : ICriteriaObject<T>
{}
But an error is thrown telling me that:
no suitable method found to override
on the method:
protected override void Dispose(bool disposing)
You need to change the partial class declaration in the .Designer.cs file to also be generic.
However, I don't think that the VS designer supports generic form classes.
You may need to make a non-generic abstract form to use with the designer, then make a generic class that inherits from it for you to actually use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With