0

Hi...i am trying doing the intersection between two List. but, i tried many times still cannot get it. Hope someone can help me...

List<KeyValuePair<String, int>> L = new List<KeyValuePair<String, int>>(sItem.ToList());
                        L.Reverse();
                        L.Sort(delegate(KeyValuePair<String, int> lhs, KeyValuePair<String, int> rhs)
                        { return rhs.Value.CompareTo(lhs.Value); });
                      
                        foreach (KeyValuePair<String,int> val in L)
                        {
                            show3 += val.Key+"\r\n";
                        }
                        MessageBox.Show(show3.ToString());

                        List<KeyValuePair<String, int>> P = new List<KeyValuePair<String, int>>(itemS.ToList());
                        foreach (KeyValuePair<String, int> pair in P)
                        {
                            show4 += pair.Key+"\r\n";
                        }
                        MessageBox.Show(show4.ToString());
2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by ddanbe
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.