C#, get all collection properties from an object
- by Eatdoku
Hi,
I have a class with 3 List collections like the following.
I am trying to have a logic which will iterate through the object's "collection"
properties and do some operation using the data stored in those collections.
I am just wondering if there is an easy way of doing it using foreach.
thanks
public class SampleChartData
{
public List<Point> Series1 { get; set; }
public List<Point> Series2 { get; set; }
public List<Point> Series3 { get; set; }
public SampleChartData()
{
Series1 = new List<Point>();
Series2 = new List<Point>();
Series3 = new List<Point>();
}
}