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

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

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

The canvas has been tainted by cross-origin data in chrome only -