Adding a horizontal separator in a MenuStrip
I'm able to run code like this:
this.menuMain.Items.Add(new ToolStripSeparator());
without any trouble... What kind of error are you getting?
In the space between the two fields you want separated by the divider, type:
-
then hit enter (in the designer)
If you need to do this programmatically you can use the same trick:
contextMenu1.MenuItems.Add(new MenuItem("-"));