I am filling an ArrayList with the string data obtained from a database query.
while (dr.Read()) {
al.Add(dr.GetString(0));
}
I am then trying to write the data back to a page but I am unsure how. I have used array lists (and vectors) in Java and the code would look something like this:
haroldjcleme...
Member
24 Points
65 Posts
ArrayList Syntax Question (C#)
Feb 11, 2007 07:59 PM|LINK
ArrayList Syntax Question (C#)
I am filling an ArrayList with the string data obtained from a database query.
while (dr.Read()) {
al.Add(dr.GetString(0));
}
I am then trying to write the data back to a page but I am unsure how. I have used array lists (and vectors) in Java and the code would look something like this:
for (int x = 0; x < al.size(); x++) {
System.out.println(al.elementAt(x).toString());
}
What would the C# equivalent be?
Thanks very much,
Harold Clements