Hi
I'm just starting to use the Visual C# Express 2008 IDE.
I have the Following code:
Code:
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WFATest
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void MainForm_Load(object sender, EventArgs e)
{
}
//===================================================
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}//================================================
commenting this part out in visual Studio express causes errors despite the fact they do nothing. Can someone explain to me why this is?
private void passToB_Click(object sender, EventArgs e) //This is button A
{
textBox2.Text = textBox1.Text;
textBox1.ResetText();
}
private void passToA_Click(object sender, EventArgs e) //This is button B
{
textBox1.Text = textBox2.Text;
textBox2.ResetText();
}
}
}
Which I intend to use to teach someone programming. The problem is Button B works perfectly but clicking A does nothing.