当我按下按钮
时,如何在列表中显示定义而不是文本public partial class Form1 : Form
{
public Form1()
{
listBox1.SelectionMode = SelectionMode.MultiSimple;
InitializeComponent();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
listBox1.Items.Add("Opportunity cost");
listBox1.Items.Add("consumer surplusSurplus");
listBox1.Items.Add("inflation");
}
private void button1_Click(object sender, EventArgs e)
{
foreach (Object obj in listBox1.SelectedItems)
{
}
}
}