I have a list that contains the following class
public class File
{
public string Name{get;set;}
public int Year{get;set;}
public decimal Amount{get;set;}
}
My list could contain i.e List
Name="File 1" Year=2011 Amount=200
Name="File 2" Year=2012 Amount=400
Name="File 3" Year 2013 Amount=500
I would like the above list to be transform to contain the following values
Name="File 1" Year=2011 Amount=200
Name="File 1" Year=2012 Amount=0
Name="File 1" Year 2013 Amount=0
Name="File 2" Year=2011 Amount=400
Name="File 2" Year=2012 Amount=0
Name="File 2" Year 2013 Amount=0
Name="File 3" Year 2011 Amount=0
Name="File 3" Year=2012 Amount=0
Name="File 3" Year 2013 Amount=500
Note that the other items with an amount of 0 are automatically generated for the missing years