list - How to fill a KeyValue Pair from an IList +C#.net -


i have ilist follows:

ilist<anodecharacteristicscomposite> anodenodatetimesoverall =     _datacontext.getanodedetails(starttime, endtime, anodenopattern).tolist(); 

where anodecharacteristicscomposite class has got 2 attributes

public class anodecharacteristicscomposite  {     [column(dbtype = "nvarchar(50)")]     public string anodestamp { get; set; }      [column(dbtype = "datetime")]     public datetime productiondate { get; set; } } 

getanodedetails(starttime, endtime, anodenopattern) stored procedure give list of anodestamp, productiondate selected time period.

now want form ilist<pair<string, datetime>> above list anodenodatetimesoverall , use other calculations.

ilist<pair<string, datetime>> anodenodatetimes =     anodenodatetimesoverall.todictionary(x => x.anodestamp, x => x.productiondate); 

i tried not working. can please me how this?

are talking keyvalue pairs? if use dictionary<tkey, tvalue> in case dictionary<string, datetime> instead of list<t>


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -