public static ToolStripMenuItem add_MenuItem(this ContextMenuStrip contextMenu, string text, Action <ToolStripMenuItem> onClick) { if (contextMenu.isNull()) { return(null); } var menuItem = new ToolStripMenuItem { Text = text }; contextMenu.Items.Add(menuItem); menuItem.Click += (sender, e) => O2Thread.mtaThread(() => onClick(menuItem)); return(menuItem); }