【发布时间】:2020-01-25 04:26:26
【问题描述】:
我想知道如何像下图那样做:
在“摘要”(右侧)的“您购买:”下,我想列出用户在“可用书籍”(左侧)中签入的选项
private void btnPurchase_Click(object sender, EventArgs e)
{
string BOOKS;
MessageBox.Show("You Purchase :\n"
+"\t" + BOOKS + "\n" //checked checkbox shows here
+ "The selected payment method is : " + payment
+ "\nYour comment about us : " + txtKomen.Text);
}
我使用上面的代码,它只显示第一个选中的复选框,如何在消息框中添加另一个选中的复选框?
我应该为BOOKS 使用数组吗?如果是这样,如何将其循环到消息框中?
【问题讨论】: