Basic Newbie question



I am learning to use C#, having decided to upgrade myself from VB.Net (to
which I also recently upgraded a few months ago from VB6).

I created a Windows Application and in it a form. I added a label and a
button on the form. Then I double-clicked on the button and added the
following:
private void button1_Click(object sender, System.EventArgs e)

{

lblTest.Text="Hello World!";

}

As I usually do in VB, I changed the button name from button1 to btnTest in
the Properties window. Now I have an error saying:

C:\Projects\vbtut\WindowsApplication1\Form1.cs(74):
'WindowsApplication1.Form1' does not contain a definition for
'button1_Click'

Why should it still be looking for button1, when I have gone in and changed
it. In VB I don't have this problem, what gives?

Thanx,
--
Anil Gupte
www.keeninc.net
www.icinema.com


.


Loading