List<Student>
のメンバーを表示するリストボックスがあります。Student
は、名前などのプロパティを持つクラスです。リストのメンバーを表示するリストボックスもあります。where
ペーパーis similar to
スチューデント。ListBoxで選択した項目を抽出するC#
ボタンをクリックすると、Student
とPaper
はどのようにしてdict {Paper.Name:Student.Name}
に追加されますか?
私は Form2
selectedStudent_Form2 = studentListBox_Form2.SelectedItem;
を試してみました。しかし、私は
Cannot implicitly convert type 'object' to 'TestProjectForProject5.Student'.