Which method can I override in List<T> to validate inserts?

  • Thread starter Thread starter Niels Ull
  • Start date Start date
N

Niels Ull

Hi!
I am looking for a simple way to validate members in my own System.Collections.Generic.List<>
derived class?

In CollectionBase, I can override OnValidate - is there a similar functionality
in List<>?

Regards

Niels Harremoë
 
Hello,

no, you can't. List<T> has no overideable methods for performance reasons.

Best regards,
Henning Krause
 

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