O
OldButStillLearning
I have a class which really defines a particular record. All of the fields
of this record are the same for another record, but they have different rules
as to what can be in those fields. So I thought I should define a class, say
"Record_1" and it has a method call "Validate_Record" which looks at the
validates all of the fields. Then I would create another class, let's say it
is called "Record_2" and then override the "Validate_Record" method to
provide the unique field validations which are required for the "Record_2"
class.
My first issue when I do this is the constructor. I get a message of "no
overload method for "Record_1" takes '0' arguements when I have the
constructor for Record_2...
Public Record_2(string rec)
I am also getting errors on each of the properties defined for the fields of
the Record_1 class saying the field is inaccessible due to its protection
level. Both of these classes are in the same namespace, do I need another
value for "private" for each of these variables, I don't think I should be
using public.
Thanks in advance for your assistance!
of this record are the same for another record, but they have different rules
as to what can be in those fields. So I thought I should define a class, say
"Record_1" and it has a method call "Validate_Record" which looks at the
validates all of the fields. Then I would create another class, let's say it
is called "Record_2" and then override the "Validate_Record" method to
provide the unique field validations which are required for the "Record_2"
class.
My first issue when I do this is the constructor. I get a message of "no
overload method for "Record_1" takes '0' arguements when I have the
constructor for Record_2...
Public Record_2(string rec)
I am also getting errors on each of the properties defined for the fields of
the Record_1 class saying the field is inaccessible due to its protection
level. Both of these classes are in the same namespace, do I need another
value for "private" for each of these variables, I don't think I should be
using public.
Thanks in advance for your assistance!