combobox index

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shweta Tyagi
    New Member
    • Apr 2012
    • 1

    combobox index

    hi group..
    i want to store all my combobox's indexes into an array....what coding should i do??plz help...
  • michaeldebruin
    New Member
    • Feb 2011
    • 134

    #2
    I am not sure, but using the following line might be usefull to you. Atleast if this is what you are looking for.

    <name of your combobox>.items and then use a foreach loop to create a new array foreach item.

    Comment

    • Subin Ninan
      New Member
      • Sep 2010
      • 91

      #3
      Below code can be used for copying combobox items in an array.
      Code:
      string[] strArray = new string[comboBox1.Items.Count];
      for (int i = 0; i < comboBox1.Items.Count; i++)
      {
          strArray[i] = comboBox1.Items[i].ToString();
      }

      Comment

      Working...