M
Mike P
I have a class with a dozen+ properties, some of which will be set a
value, and some not, depending on the constructor called. I also have a
method which has only one overload and all of the properties are being
sent to it.
My question is, because some of these properties will not be initialised
by the constructor used, calling this method in some cases will crash my
app unless I initialise all the properties at some point in my class.
Is the static constructor the best place to do this?
Regards,
Mike
value, and some not, depending on the constructor called. I also have a
method which has only one overload and all of the properties are being
sent to it.
My question is, because some of these properties will not be initialised
by the constructor used, calling this method in some cases will crash my
app unless I initialise all the properties at some point in my class.
Is the static constructor the best place to do this?
Regards,
Mike