08-27-2009, 08:50 AM
|
#8 (permalink)
|
|
The Acquainted
Join Date: May 2009
Posts: 178
Thanks: 9
|
No we are on the same page apologies i misunderstood you. I think what you are suggesting is exactly what i'm looking for. I can set default values for both variables as spaces in the class and throw an exception if either has a value of spaces when the class is called. If I pass in the variables when calling the class this will override the default values set in the class.
Next question - is throwing an exception in a constructor method bad practice as it leaves a half instantiated object?
Many Thanks.
|
|
|
|