Hi,
I have a class like the following:
public class Record
{
public double lastBasedOn;
public double total;
public double totalCount;
public double[] sum;
public long[] count;
public double[,] max;
public double[,] min;
}
My problem is that I don't know what variables I am going to use until
run time, i.e. I may only need to keep record of total and sum. Would
this then mean that the lastBasedOn & totalCount variables would
require memory space even though I won't use them? Memory usage us
important because there could be thousands of instances of the Record
class created.
Also, I use double and long above as I don't know their maximum
potential values until run time.
So I guess what i'm asking, is can I create c# classes dynamically
i.e. create:
public class Record
{
public double total;
public double[] sum;
}
Any ideas?
thanks,