OO Advise and Clarification
I am fairly new to .NET and OO.
My background is in ASP and VB6.
If I were to create a simple class called 'Person'.
Am I correct in using the constuctor to initialise an existing person and a static method to create a new person]
EG
Person p1 = new Person(personID)
This would then load all the instance variables from the db such as Name, DOB, etc.
But I would use a static method to create a new Person.
EG
Person p2;
p2 = Person.CreateNewPerson(Name,DOB,ETC)
This would insert a new person into the DB and return that person as a new person instance.
I am looking for any general advise on what I should do.
Could this be handled better another way?
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
|