WinformsアプリをWPFアプリに変換しようとしていて、次のコードがあります:
ObservableCollection<Dictionary<string, string>> PlatypusDict =
new ObservableCollection<Dictionary<string, string>>();
. . .
PlatypusDict = PlatypusData.getPlatypusAccountsForCentury(Convert.ToInt32(labelPlatypusName.Tag));
...これにより、次のエラーメッセージが表示されます。
タイプ 'System.Collections.Generic.Dictionary' を 'System.Collections.ObjectModel.ObservableCollection>' に暗黙的に変換することはできません
...そして、これは何の役にも立ちません:
PlatypusDict = (System.Collections.ObjectModel.ObservableCollection<System.Collections.Generic.Dictionary<string, string>>)PlatypusData.getPlatypusAccountsForCentury(Convert.ToInt32(labelPlatypusName.Tag));
ObservableCollection を使用して ListView をバインドする必要はありませんか、またはここでの回避策/適切な方法論は何ですか?