<p>How would I implement "close all other tabs" function for a tab control using Context menu strip?</p>

I made a small app with just one tabcontrol in the main window and a context menu connected to that tabcontrol.
The following is the handler for the context menu item:
```
```
private void closeAllOtherToolStripMenuItem_Click(object sender, EventArgs e)
    {
        for (int i = 0; i < this.tabControl1.TabCount; i++)
            if (i != tabControl1.SelectedIndex)
                tabControl1.TabPages.RemoveAt(i--);
    }
```
```