Get menu item name

how to get name of menu item ?(
Who is Participating?
Perhaps this if you are in an menuitem_click - event:

(sender as MenuItem).Name

change MenuItem to ToolStripMenuItem if you have a toolstripmenu.

(sender as ToolStripMenuItem).Name

change .Name to .Text if you like to have the menu text.
Fahad MukhtarDistinguished EngineerCommented:
where do u want to get this name? in what event?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.