Initializing mandatory values in the public ctor is a pretty common design pattern. That's what the option of making the zero-arg ctor protected is for -- its a middle-ground between the requirement NH has for a zero-arg ctor and the desire to 'prevent' someone from new-ing up one of your objects without providing the mandatory values. With the zero-arg ctor protected, its still true that someone (reasonably clever) can obviously derive from your class and access the zero-arg ctor that way, but otherwise its 'shielded' from being 'casually' invoked by consumers of your objects.
-Steve B. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/XnhvURn9vKgJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
