当前上下文C#文本框中不存在交互

时间:2019-02-17 19:37:37

标签: c#

一开始我已经加入了Microsoft.VisualBasic命名空间

private void btnAddHousehold_Click(object sender, EventArgs e)
{
    string Address = Interaction.InputBox("Enter the Address of the new Household","Add new Household");
    if (Address != "")
    {
        Household temp = new Household();
        temp.Address = Address;
        Program.Households.Add(temp);
        SaveToFile();
        RefreshForm();
    }
}

我希望弹出一个文本框并询问住户地址

0 个答案:

没有答案