次のように自分自身を呼び出す再帰関数を1つ返しましたが、それを壊すことができません。これが私のコードです
public DataSet GetTableInfo(string sItem, double dAmount)
{
string str = string.Empty;
double d = 0;
Dataset ds = new Dataset();
// Filled the dataset with the query, select Column1, Column2 from table
if(ds.Tables[0].Rows.Count != 0)
{
if(ds.Tables[0].Rows[0]["Column1"].ToString() != string.empty)
{
GetTableInfo(str,d);
}
else
{
return ds;
}
}
return ds;
}
私のelse条件が実行されたにもかかわらず、関数から抜け出すことができません.誰かがどこで間違ったのか教えてもらえますか?