Okay, so first (since I haven't posted in this thread before), total C# newbie, multi-years on VBA but struggling through the early C# learning curve.
So here's my deal this time.
1. created a new Windows Form project, result, empty form.
2. added some controls (widgets if you prefer).
3. double-clicked on several widgets to let the designer write the code for me. Result, two stub methods, one for a textBox (text changed), one for a Button (on-click event).
Realize, up to this point I haven't written a single character of code, the designer did it all. But the textBox stub came out fine, while the Button stub had all sorts of complaints. Following shows both:
The debugger doesn't like private, diesn't like sender, and doesn't like e. I can post the full text of the error messages for each, but my question is more basic than that: since the designer wrote all this code, not me, why is it unhappy with the result? I didn't change a single thing about all the stuff at the top, using statements, namespace, etc., etc., etc., so I am baffled at why this is happening. No fair, I'm just a beginner! Can anybody 'splain me what's up?
So here's my deal this time.
1. created a new Windows Form project, result, empty form.
2. added some controls (widgets if you prefer).
3. double-clicked on several widgets to let the designer write the code for me. Result, two stub methods, one for a textBox (text changed), one for a Button (on-click event).
Realize, up to this point I haven't written a single character of code, the designer did it all. But the textBox stub came out fine, while the Button stub had all sorts of complaints. Following shows both:
C#:
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
Last edited by a moderator: