以前にこれを行って完全に機能させたことがありますが、方法を思い出せません
アイテム クラスの背後に 3 つのプロパティがあります
namespace Budgeting_Program
{
[Serializable]
public class Item
{
public string Name { get; set; }
public double Price { get; set; }
public string @URL { get; set; }
public Item(string Name, string Price, string @URL)
{
this.Name = Name;
this.Price = Convert.ToDouble(Price);
this.@URL = @URL;
}
public override string ToString()
{
return this.Name;
}
}
}
今私の編集ウィンドウに
public Edit(List<Item> i, int index)
{
InitializeComponent();
itemList = i;
updateItemList();
itemListBox.SetSelected(index, true);
}
選択したインデックスの背後にある項目データをテキスト ボックスに反映させたい。これはどのように可能ですか。使用した方法を覚えていない前に、それを行ったことを覚えています。