私は辞書を使って情報を収集しています。詳細を収集したら、var 変数を使用してキーに基づいて辞書の値を並べ替える必要があります。その後、ソートされた var 変数を新しい辞書に挿入する必要があります。ここで、ソートされたデータをディクショナリに挿入するのに問題があります。
ここにコードを投稿しています:
var orderDic = from dic in dictionaryColl
orderby dic.Key ascending
select dic;
Dictionary<int, string> newDic = new Dictionary<int, string>();
newDic =(Dictionary<int,string>)orderDic; // Here i'm not able to assign data to dictionary
前もって感謝します..