I recently saw some college teacher code where he had something like this:
public void Button1_Click(blabla)
{
}
Isn't it considered good programming practice to call a method to do the dirty work, so if the method changes, you need to change the method itself, not the event? (Less likely to break something)
public void Button1_Click(blabla)
{
DoSomething();
}
public void DoSomething()
{
}
source
share