use a typed dataset to create data that can be used in a precision data type for example, I created dsAppointment
DsAppointment dsAppointmentTmp = new DsAppointment(); DsAppointment dsAppointment = new DsAppointment(); //add all appointment dsAppointmentTmp.Appointment.AddAppointmentRow(name,start,end,body) //use select(filter,sort(name of columns) DataRow[] rows1 = dsAppointmentTmp.Tables[0].Select(string.Empty, dsAppointmentTmp.Tables[0].Columns[1].ToString()); foreach (DataRow thisRow in rows1) { dsAppointment.Tables[0].Rows.Add(thisRow.ItemArray); }
// returns the sort dsAppointment return dsAppointment;
source share