As an example, I have a type like this:
public class Stuff
{
public Double StuffAmount;
public String StuffDescription;
public DateTime StuffDate;
}
I need to check for things like standard deviation, and I've found those solutions elsewhere on stackoverflow. But to do them the way they're being proposed, I would need to do something like this:
List<Double> stuffAmounts = new List<Double>();
foreach (var s in List<Stuff>)
{
stuffAmounts.Add(s.StuffAmount);
}
//now I have a list of doubles that I can do frequently referenced math functions with
Is there anyway to do something like this without having to make a new list, just using my complex type that already has the doubles as properties?