问题
I'm creating a login that saves data on a database.
How do I declare the Name entered to the string value as name so when I say .Show it returns the name I typed in?
private void btnLogIn_Click(object sender, EventArgs e)
{
string input = Microsoft.VisualBasic.Interaction.InputBox("Prompt", "Title",Name, 0, 0);
MessageBox.Show(Name);
}
回答1:
Easy as this:
Change
MessageBox.Show(Name);
to
MessageBox.Show(input);
来源:https://stackoverflow.com/questions/30176994/c-sharp-inputbox-string-value