You don't necessarily need a constructor like this. Instead, you could simply create an object then set the properties. However, constructors like this offer both convenience and also the notion of object validity. In other words, you can force someone to
provide the information that you want by requiring them to use a constructor that takes the information.
could You please write some code regarding this, I meant how should I add customers with out using a constructor.
Thanks
Gaurav
It is our choices that show what we truly are, far more than our abilities...
demoninside9
Participant
1238 Points
1720 Posts
Re: It is the right way to do so: Constructor
Jan 31, 2012 08:43 AM|LINK
could You please write some code regarding this, I meant how should I add customers with out using a constructor.
Thanks
Gaurav