ArrayList al = new ArrayList(); DataTable dt = new DataTable(); dt.Columns.Add("A",typeof(double)); dt.Columns.Add("B", typeof(double)); dt.Columns.Add("C", typeof(double)); DataRow dr1 = dt.NewRow(); dr1["A"] = 5.5; dr1["B"] = -20.6; dr1["C"] = -3.8; dt.Rows.Add(dr1); for (int i = 0;i< dt.Rows.Count;i++) { al.Add(Convert.ToDouble( dt.Rows[i]["A"])); al.Add(Convert.ToDouble(dt.Rows[i]["B"])); al.Add(Convert.ToDouble(dt.Rows[i]["C"])); } al.Sort(); Response.Write(al[al.Count - 1].ToString()+"<br/>");//最大值 Response.Write(al[0].ToString());//最小值