Home > Net >  After the completion of the c # DataTable query, how to read a few column value to an int array
After the completion of the c # DataTable query, how to read a few column value to an int array

Time:03-29


I have a database with a total of 10 fields, field called id (character type field), field 2 (int type fields), field 3 (int type field),... Field 10 (int type fields), after I connect database, through the DataTable query can only query to a line, how can I remove the second field in this line (int type fields) value, the fifth field numerical field (int type), 8 fields (int type fields) values into an int array?

Note: I only want to remove the DataTable column 2, 5, 8 column value to an int [] array, I don't want to take out the other field values, I just want to take out the three columns of the numerical well transmitted to other methods,
  •  Tags:  
  • C#
  • Related