According to a specific event (for example, a tap on a button), you need to pop up a dialog box in which you can enter text that is then assigned to a variable. How to call a simple dialog box that says clearly. But there is not enough brains to enter there (

    1 answer 1

    VB.NET has an InputBox function that shows the user a simple dialog for entering text.

    This function can be accessed in the C # project. To do this, add a reference to the Microsoft.VisualBasic assembly to the project ( Project menu -> Add reference ... and mark the line with Microsoft.VisualBasic in the window that opens) and then call the Interaction.InputBox method:

     private void button1_Click(object sender, EventArgs e) { string result = Microsoft.VisualBasic.Interaction.InputBox("Введите текст:"); }