View Single Post
Old 08-26-2009, 03:28 PM   #6 (permalink)
captainmerton
The Acquainted
 
captainmerton's Avatar
 
Join Date: May 2009
Posts: 178
Thanks: 9
captainmerton is on a distinguished road
Default

I dont want to hard code the variable no.

I'll try and make it more simple:

I have created a class (a stand alone component of functionality). I have no control over what goes into that class all I know is i need 2 pieces of information to instantiate the object. I want to build in some kind of validation into the class this is there a way I can check for existance of the 2 variables inside the class?

I dunno i feel i am just talking round in circles. Either i validate the variables outside of the class and make sure they are in existence before i pass them in to the class or I do it inside the class. I'd rather find a way of doing it inside the class otherwise it isnt a very robust class if the whole thing falls over when it get unexpected input.
captainmerton is offline  
Reply With Quote