lb1、lb2、lb3 の 3 つの ListBox があります。
lb1 には 4 つの要素があり、lb2 には 5 つの要素があるとしましょう。
(lb1 と lb2) のそれぞれの一意の組み合わせを lb3 の要素に割り当てることができます。
コレクションに保存したい組み合わせと関連付け。私の最初の方法は、Key = (lb1Element1_lb2Element1)、Value = lb3Element1 で KeyValuePair を使用することでした。
しかし、このソリューションでは問題が発生します。lb1Element1 を削除するとします。KeyValuePair-List から lb1Element1 が発生する他のすべての組み合わせを削除するオプション (?) はありません。
この場合、どのコレクション タイプが最適でしょうか?
前もってありがとうジョン
編集: 3 つの ListBoxes にはすべて数字が含まれています。