Note that there are some explanatory texts on larger screens.

plurals
  1. POSorting , searching a dictionary in C#
    primarykey
    data
    text
    <p>I have a dictionary, Dictionary listOfProducts. This listOfProducts can have hundreds of products. string key is the product number I want to get some specific products by product number(key), I have a list of keys e.g. 64290,64287,59261,50990,50975,50897,68494,68495,51015,68493 the resulting dictionary should have only items with the above keys and in the same order, Any idea how can i do this. ? If there is any order data structure that can work better in this scenario?</p> <p>Here is the complete scenario :</p> <p>Here is the complete scenario : I get an xml from server with the product info the formate of this XMl is</p> <pre><code>&lt;key&gt;64285&lt;/key&gt;&lt;string&gt;productname[SEPERATOR]product description&lt;/string&gt; &lt;key&gt;64285&lt;/key&gt;&lt;string&gt;productname[SEPERATOR]product description&lt;/string&gt;&lt;key&gt;64285&lt;/key&gt;&lt;string&gt;productname[SEPERATOR]product description&lt;/string&gt; </code></pre> <p>Now this XML does not contain all the prodcut detaqils (e.g. this product does not have the Product Rating , or Product Color) I need to sort and search by Product rating and Product Color. For that i get another XMl wich has the product keys order by Rating .</p> <pre><code>&lt;dict&gt; &lt;key&gt;rating&lt;/key&gt; &lt;string&gt;64285,68495,68494,64228,68491.......&lt;/string&gt; &lt;key&gt;price&lt;/key&gt; &lt;string&gt;68493,64234,50863,64236,64223,....&lt;/string&gt; &lt;/dict&gt; </code></pre> <p>Similary i have to Search for the Product with the Color "White" For this i get XMl with the list the products that are in white color, </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload