If we have a list box 1stBox as shown in the given image des
If we have a list box (1stBox) as shown in the given image describe completely and clearly the effect of each of the following statements [for #3 to # 10] 1stBox.Items.Clear() 1stBox.Items.RemoveAt(0) 1stBox.Items.Remove(\"Math\") 1stBox.Items.Add(\"Law\") 1stBox.Items.RemoveAt(1stBox.selectedlndex) 1stBox.Items.RemoveAt(1stBox.Items.Count- 1) 1stBox.Sorted = true1 1stBox.Items.Contains(\"English, \") return a
Solution
3) lstBox.Items.Clear()--> clears the lstBox
4) lstBox.Items.RemoveAt(0) --> Remove the first item from lstBox
5) lstBox.Items.Remove(\"Math\") --> Remove the Math item from lstBox
6) lstBox.Items.Add(\"Law\") --> Add an item Law at the end of the list.
7) lstBox.Items.RemoveAt(lstBox.SelectedIndex) --> Remove the selected indexed item from lstBox
8) lstBox.Items.RemoveAt(lstBox.Items.Count-1) --> Remove the last indexed item from lstBox
9) lstBox.Sorted = True--> sorting the lstBox
10) lstBox.Items.Contains(\"English\") --> returns false
![If we have a list box (1stBox) as shown in the given image describe completely and clearly the effect of each of the following statements [for #3 to # 10] 1stB If we have a list box (1stBox) as shown in the given image describe completely and clearly the effect of each of the following statements [for #3 to # 10] 1stB](/WebImages/15/if-we-have-a-list-box-1stbox-as-shown-in-the-given-image-des-1022985-1761529324-0.webp)