currently i have a class like this;
public static class drug
{
public const double[] coc = new double[] { 156, 4, 8, 164 };
public const double[] mar = new double[] { 234, 64, 34, 342 };
}
the way i reference it is like this:
double one = drug.coc[0];
however i would like to reference it like this
double one = drug.coc.var1
how can i change my class to support this?
You could nest it in the same fashion… however, you’d obviously lose any array functionality.