-5
請有人能幫我找到最多的一個字符串?下面的代碼:找到最大編號
if (dt.Rows.Count > 0)
{
int max = 0;
foreach (DataRow dr in dt.Rows)
{
bookNo = dr.ItemArray[0].ToString();
int i = Convert.ToInt32(bookNo.Substring(bookNo.Length - 1));
if (i > max)
{
}
}
感謝
首頁工作不允許 –
便於你這樣做在SQL太 –