R
rodchar
hey all,
the following code snippet was in a tutorial at asp.net regarding DataList
examples and this was used as the datasource:
ICollection CreateDataSource() {
DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add(new DataColumn("StringValue", typeof(string)));
for (int i = 0; i < 10; i++) {
dr = dt.NewRow();
dr[0] = "Item " + i.ToString();
dt.Rows.Add(dr);
}
DataView dv = new DataView(dt);
return dv;
}
my question why not make the return type a DataView instead of this
ICollection interface?
thanks,
rodchar
the following code snippet was in a tutorial at asp.net regarding DataList
examples and this was used as the datasource:
ICollection CreateDataSource() {
DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add(new DataColumn("StringValue", typeof(string)));
for (int i = 0; i < 10; i++) {
dr = dt.NewRow();
dr[0] = "Item " + i.ToString();
dt.Rows.Add(dr);
}
DataView dv = new DataView(dt);
return dv;
}
my question why not make the return type a DataView instead of this
ICollection interface?
thanks,
rodchar