Further extending the question:
C# List<object>
public class SampleInformation
{
public string Nutrient { get; set; }
public decimal NutrientTotal { get; set; }
public int NoSamples { get; set; }
public decimal Average { get; set; }
public decimal StandardDeviation { get; set; }
public decimal CoVariance { get; set; }
public decimal PSD { get { return Average + StandardDeviation } }
public decimal NSD { get { return Average - StandardDeviation } }
}
The above class calculates average, SD, CoVar, etc.
The above class gaves me output as:
Nutrient | Average | # Samples | SD | CoVar
I would like to extend the above to and bind it to a list
Nutrient | Average | # Samples | SD | CoVar | Item1 | Item2 | ...
XXX | Average | # Samples | SD | CoVar | Value for XXX for item 1 | Value for XXX for item 2 | ...
yyy | Average | # Samples | SD | CoVar | Value for YYY for item 1 | Value for YYY for item 2 | ...
Any quick help ?