Tech Off Post

Single Post Permalink

View Thread: basic C# question
  • User profile image
    Andrew Davey

    littleguru wrote:
    new EventHandler is a delegate. In .NET you can't directly give to the event a method. This doesn't work:

    btn.Click += btn_Click;

    Um, yes you can in C# 2.0. I use it all the time Smiley It makes the code much cleaner to read.