OK so I admit right off the top that this is a bit screwy … but it does serve a logical purpose. I’m using C# for a current project and I’m trying to find a way to override
Simply don't use new. Set the array in your subclass' constructor.
EDIT: with code:
class subclass1 : baseclass
{
public subclass1()
{
array = new string[]
{
"class1value1",
"class1value2",
"class1value3",
"class1value4"
};
}
}
class subclass2 : baseclass
{
public subclass2()
{
array = new string[]
{
"class2value1",
"class2value2",
"class2value3",
"class2value4"
};
}
}