User Input From TextBox In C#
Sample code
using System;#UserInput#DesktopApplication#AspDotNet #Mvc
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace HelloWorldInWindowsForm
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void showButton_Click(object sender, EventArgs e)
{
string firstName = firstNameTextBox.Text;
string lastName = lastNameTextBox.Text;
string fullName = firstName + " " + lastName;
fullNameTextBox.Text = fullName;
//MessageBox.Show("Hi, " + firstName + " Hello world in C#");
}
}
}
Tags
C#