evgeny

evgeny

  • NA
  • 9
  • 0

Dynamically changing array

Sep 21 2011 3:11 AM
I need something like this:

 private void LoadFieldsNames(string table_name)
        {
            string[] fields = new string[100];

            switch (table_name)
            {
                case "step_result":
                     fields = {"ID", "UUT_RESULT", "STEP_PARENT", "LOOP_INDEX", "INTERACTIVE_EXENUM"};
                     break;
                case "uut_result"
                   fields = {"ID", "STATION_ID", "BATCH_SERIAL_NUMBER", "TEST_SOCKET_INDEX",};
                  break;
            }
            comboBoxSelField.Items.AddRange(fields);
        }


But i get an error. How can i manage the string propelly?


Answers (5)