J
Jack Addington
1) I have created a visual control that relies on a logic class to do much
of its work.
2) The logic class will be assigned on the form through a register method.
3) I have a public property for accessing the control defined.
4) To avoid other people calling the control before it is initialized I
throw an ArgumentNullException in the propert.get section.
My problem is that when I place this visual control on a form, the exception
is firing. How do I get this exception to only fire at runtime or do I need
to re-arrange my code/thinking?
public LogicObj Logic
{
get
{
if ( _logic == null ) throw new ArgumentNullException(...);
return _logic;
}
}
thx
jack
of its work.
2) The logic class will be assigned on the form through a register method.
3) I have a public property for accessing the control defined.
4) To avoid other people calling the control before it is initialized I
throw an ArgumentNullException in the propert.get section.
My problem is that when I place this visual control on a form, the exception
is firing. How do I get this exception to only fire at runtime or do I need
to re-arrange my code/thinking?
public LogicObj Logic
{
get
{
if ( _logic == null ) throw new ArgumentNullException(...);
return _logic;
}
}
thx
jack