Gabriel
Gabriel

Reputation: 3045

How should I handle exceptions for invalid generic type arguments?

How should I handle exceptions for invalid generic type arguments? Should I make my own class? InvalidOperationException or ArgumentException? I'm not too sure on how to 'handle' this...

Upvotes: 0

Views: 490

Answers (1)

Austin Salonen
Austin Salonen

Reputation: 50245

I would let the compiler do it for me with contraints on the type parameters.

Upvotes: 2

Related Questions