You are developing an Windows Forms Application. You want to make a copy of an existing tool strip menu item named menuItem and add it to a ContextMenuStrip control named ctxMnuStrip. Which code will you go for?

 Posted by Niladri.Biswas on 1/18/2013 | Category: Others Interview questions | Views: 3333 | Points: 40
Select from following answers:
  1. ToolStripMenuItem item;item = new ToolStripMenuItem(menuItem.Text, menuItem.Image, new EventHandler(menuItem _Click));ctxMnuStrip.Items.Add(item);
  2. ctxMnuStrip.Items.Add(item);
  3. ctxMnuStrip.Add(item);
  4. ToolStripMenuItem item;item = new ToolStripMenuItem(menuItem.Text, menuItem.Image, new EventHandler(menuItem _Click));ctxMnuStrip.Add(item);
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response