Menu suggestion

  • Thread starter Thread starter Bud J via DotNetMonster.com
  • Start date Start date
B

Bud J via DotNetMonster.com

normally with a menu i use a simple switch statement. i'm thinking this is
not a very good way of doing it. does anyone have any suggestions on a
better way
 
thanks for the reply.

If i understand what you are saying
mnuItemOne.Click+= new EventHandler(OnMenuOneClick)
 
oops accidentally posted partial message

to continue

if i understand what you are saying
menuOne.Click+=new EventHandler(MenuOneClick)
menuTwo.Click+=new EventHandler(MenuTwoClick)

would definetly work but wouldn't that be a variation of a switch.
 
to continue
if i understand what you are saying
menuOne.Click+=new EventHandler(MenuOneClick)
menuTwo.Click+=new EventHandler(MenuTwoClick)

would definetly work but wouldn't that be a variation of a switch.
uh?
what kind of variation?
no "if" will ever be involved in such event dispatching....
 
Bud J via DotNetMonster.com said:
if i understand what you are saying
menuOne.Click+=new EventHandler(MenuOneClick)
menuTwo.Click+=new EventHandler(MenuTwoClick)

would definetly work but wouldn't that be a variation of a switch.

Nope. The code you posted is the way to go... :-).
 
Back
Top