private void button1_Click(object sender, EventArgs e) { Student s = new Student(); s.FirstName = textBox1.Text; s.LastName = textBox2.Text; MessageBox.Show(s.GetFullName()); }