![]() IL_001E: callvirt .get_SelectedIndexīut we are in the realm of micro-optimizations and, as said in a comment, use what is more readable for you. However, if we are just talking about comparison then there is a very small advantage for SelectedIndex because there is no loading and testing of a string. Usually SelectedItem and SelectedIndex are used inside a SelectedIndexChanged event and it easy to forget the Nothing possibility Dim curValue = () ' <- Possible NullReferenceException' SelectedItem could be null and you should remember this when trying to access that property. 4) Add a new property called ComboSelectedIndex and set its type to Integer. 3) In the tab window that opens click on the settings tab to the left. I find SelectedIndex easier to use because you can work on a number and when there is no selection you don't have to handle the null. 1) Right click your project in the solution explorer (or double click on the 'My Project' folder in solution explorer) 2) Click on properties.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |