7
我的代碼存在問題。在Datatable中獲取行的值c#
foreach (DataRow dr in dt_pattern.Rows)
{
part = dr["patternString"].ToString();
if (part != vpart)
{
System.Console.WriteLine(part);
System.Console.WriteLine("Geben Sie bitte für den Abschnitt die AT ein: ");
temp = System.Console.ReadLine();
AT = ToDouble(temp);
dr["AT"] = AT;
double xATmax = ToDouble(dr["Ampl"].ToString());
double x = ToDouble(dr["Time"].ToString());
double yATmax = ToDouble(dr["Ampl"]+1.ToString()) + AT;
double y = ToDouble(dr["Ampl"].ToString());
dr["alphaATmin"] = Gradient(x,xATmax,y,yATmax);
System.Console.WriteLine(dr["alphaATmin"]);
}
vpart = part;
}
但我需要在xATmax和yATmax下一行的值...有人可以幫助我嗎?