combobox - c# loop comparisons -
I do a lot using Cambodox. For example, I often loop through them to find matching based on the selected value ...
while (cmbCompany.SelectedValue.ToString ()! = B1ID) { CmbCompany.SelectedIndex ++; }
a) Do I have some very fast options! B) If my comparison was against an integer, then there is a benefit in declaring the string and that is equal to integer. Ostring (), or if i just use B1ID.ToString () in my example (in my example above) Is compiler customizable for me?
C) or string comparison is so slow that I will be better parsing (or casting) the value selected for an integer?
cmbCompany.SelectedValue = B1ID
should do the trick - is not it? is?
Comments
Post a Comment