Thank you for your answer. Here is the code:

// declare
int[] index_of_selected_tab;
index_of_selected_tab = new int[4];
TabControl[] tabControl;
tabControl = new TabControl[4];

//init
for (i = 0; i < 4; i++)
{
index_of_selected_tab[i] = 0;
tabControl[i] = new TabControl();
}

//later
let's say tabControl[2].SelectedIndex is equal to 3 because I have clicked on the fourth tabpage of tabcontrol[2]

//then when I do this
index_of_selected_tab[2] = tabControl[2].SelectedIndex;
//index_of_selected_tab[2] is now equal to 3 (this makes sence), but when I do this
tabControl[2].SelectedIndex = 0;
//then, index_of_selected_tab[2] changes value to 0 !!!!!!!!!

If not clear, I can send the complete code if possible (just tell me where).