C# Exception thrown for when class isn't fully initialized -


what exception should raise tell caller class isn't initialized? exception found typeinitializationexception, didn't seem appropriate.

it's impossible class not initialized upon use, unless you're doing manual init() type method call. if you're using constructors , initializer syntax, it's guaranteed c# lang spec initialized. if need throw something, use invalidoperationexception note saying "call init first!"


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c# - Avoiding duplicate methods for Task and Task<T> -

javascript - Which segment of a polyline was clicked? -