Most appropriate exception for a collection not being initialised?

Posted by Brian Scott on Stack Overflow See other posts from Stack Overflow or by Brian Scott
Published on 2010-03-25T09:39:20Z Indexed on 2010/03/25 9:43 UTC
Read the original article Hit count: 391

Filed under:
|
|
|

What is the most appropriate .Net exception type for when you have a class which must have its collection property initialised with at least one item?

I'm thinking that it would be an ArgumentOutOfRangeException but is there something more appropriate based on a collection?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about exception