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
 
Back
Top