I have a set of C# constants, for example:
LoanApplication.CONST_FIELD_NAME_DOB
LoanApplication.CONST_FIELD_NAME_EMPLOYMENTSTATUS
at a later time, I want to create an array that holds these constants.
I have tried:
const string [] Constants =
{
LoanApplication.CONST_FIELD_NAME_DOB,
LoanApplication.CONST_FIELD_NAME_EMPLOYMENTSTATUS,
}
but I get the error:
a const field of a reference type can only be initialized with null
There are lots of questions that relate to this problem, but none where the array contains a list of existing constants.
Any ideas?