Saturday 15 June 2013

c# - Varying amount of dictionaries in a DataTable -


Earlier I asked a question about merge the known number of dictionaries into 1 single datatellah: Darin has given me a satisfactory The solution provided the problem in hand but my problems have developed. I can not do anything about the dictionaries to be supplied. In fact it can be any number between 1 and 10. Because of this, these collections have been given to me in one collection, i.e .::

  IList & lt; IDictionary & lt; String, string & gt; & Gt; A static amount of dictionaries was given as follows:  
  var dic1 = new dictionary () {{"A", "s"}, {" B "," d "}, {" c "," a "}, {" d "," w "},}; {"A", "Z"}, {"B", "E"}, {"C", "R"}, {"D", "T"},}; ("A", "I"}, {"B", "O"}, {"C", "U"}, {"D", "P"},} Var Table = New Datatelle (); Add column ("C", typef (string)), Add column ("K", "Type", "String"); Add column ("C1", typef (string)). Add column ("C3", typef (string)); foreign currency (key key in DIC1). {Add table .oo (key, DC1 [key], DC2 [key], DC3 [Key]);}  

Now, I will call this code for different dictionaries How can I work (especially in the form of lines as a part of xxx) in that line a dictionary in the essence of each column)

I'm looking for:

  foreach (var key in the list [0]. / / Assume that the first defines all {object [] Row data = new object [list.account + 1]; row data for [0] = key; (int i = 0; i  

Biteedblu, can be params IDictionary & lt; String, string & gt; [] (in which the position is . to .length ) - but either should work.


No comments:

Post a Comment