私は(バランス、転送、メソッドを撤回)BankAccount
クラスのインスタンスが含まれている私のリストボックス内のオブジェクトを持っているとWallet
クラス(名前、誕生日など)を選択したリストボックス項目のオブジェクト情報を取得します。選択されたリストボックスオブジェクト(lbAccounts)についての情報の一部(残高など)。リストボックスで<br> が、私は表示する必要が
オブジェクト:
DateTime birth = Convert.ToDateTime("01/01/1970");
Wallet account = new Wallet("Bob", "Smith", birth);
BankAccount account1 = new BankAccount(account);
account1.DepositFunds(5000);
BankAccount account2 = new BankAccount(account);
account2.DepositFunds(300);
//Adding accounts to listbox
lbAccounts.Items.Add(account1);
lbAccounts.Items.Add(account2);
QUESTION:はどのように選択したリストボックスオブジェクトのバランスを得るのですか?
WPF? WebForms? WinForms? ASP.NET MVC? ...? –
選択したリストボックスオブジェクトの結果を[BankAccount]のタイプに解析/キャストしますか? – Hexie
ウェブフォーム、C#とVS 2015 – Thisone