A class, it's method and self-referencing
I created this class and a method. the method is used to submit data to a DB. that data is actually an object created from the same class. W
What I'd like to know is, is it considered good practice to use the Private variables(fields) or should you still use the object.properties? ex:
VB Code:
public class Loan
private strName as string 'the field
public property Name() as string
get
return strName
end get
set
..
..
end set
public function SubmitData() as something
send strName to DB 'OR
send LoanObject.Name to DB
end function
That's pretty close anyway. I am currently sending the variables' data and NOT sending the data as properties. Which is more efficient? Which is better?