Your New must take the arguments passed in, and put their values into strFirstName and strLastName.
When you create a property, .NET will create a format for you with a Get and a Set. The set will take 1-or-more arguments, and will adjust the values of internal variables with that info (eg, strFirstName, strLastName, etc.).
The Get will have a return value. When using the class, the computer will recognize whether you are setting or retrieving a value through the usage you are presenting, and will choose the proper half of the property to use (Get or Set).
With what you are providing, monthly pay is impossible.
But if you had a read-only property (which then would only have a Get), which returned a constant (which therefore would be the same for all instances of the class), that could serve as a mockup of a read-only monthly pay.
|