I have a collection of items that is populated from LINQ and I have the need to access a sibling item (a date), that will be set from the UI level. Since I do not know the date at the time the data collection is populated, I need a good way to access the date property from each of the items in the collection. Here is my class structure stripped down:
public class TestClass
{
public DateTime MyDate;
public List<MySite_ReportResult> Items { get; set; }
}
To summarize, for each "MySite_ReportResult", I want to be able to access "MyDate". Does anyone have a good suggestion that is a best practice? This collection will eventually be bound to a grid, so I will be creating a partial class and adding an additional property based on what the DateTime value is.