贴代码:
1private void toolStripMenuItem1_Click(object sender, EventArgs e)
2 {
3 for (int i = 0; i < ((ToolStripMenuItem)((ToolStripMenuItem)sender).OwnerItem).DropDownItems.Count; i++)
4 {
5 }
6}
2 {
3 for (int i = 0; i < ((ToolStripMenuItem)((ToolStripMenuItem)sender).OwnerItem).DropDownItems.Count; i++)
4 {
5 }
6}