example:
public static ArrayList FillArrayList(String StoredProcedure, List<sqlparameter> sqlParameters, String ConnectionName)
{
ArrayList list = new ArrayList();
try
{
using (SqlDataReader reader = FillDataReader(StoredProcedure, sqlParameters, ConnectionName))
{
if (reader.HasRows)
{
while (reader.Read())
{
Object[] listValues = new Object[reader.FieldCount];
reader.GetValues(listValues);
list.Add(listValues);
}
}
reader.Close();
}
}
catch (Exception ex)
{
throw new Exception(ex.Message, ex.InnerException);
}
return list;
}</sqlparameter>