To reference last in a List, I would usually use .Count-1 so MainTabControl.Items[Count-1]. However whenever I try to reference any item in MainTabControl.Items[] it does not work. e.g
MainTabControl.Items[0]
or
int tabCount = MainTabControl.Items.Count;
MainTabControl.Items[tabCount-1]
None of the above work.
Ideally what I want to do is check that MainTabControl.SelectedIndex = MainTabControl.Items[Count-1] (last tab on the window) before I then apply an action such as Focus(). Please can you tell me how I can access the reference for the last tab in the window.
Thanks
Comment