How would I store a query from mysql into a list.
For example, i have column a b c d,
public list 开发者_开发问答ListA {get; set;}
I want to store column a b c d, and then reference it like
foreach(string here in ListA)
{ string columna = list[0];
string columnab = list[1];}
hope that makes some
A better way to do it would be to create a class like this
class Item
{
public string A {get; set;}
public string B {get; set;}
public string C {get; set;}
public string D {get; set;}
}
and store and iterate over a List<Item>
精彩评论