本文介绍了我想逐行阅读就是这样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
public static List<int> AssignmenBlock_IDs()
{
List<int> Block_IDsList = new List<int>();
SqlConnection connecetion = ConnectingDatabase.GetConnection();
string command = "SELECT ID FROM Assignment";
SqlCommand commn = new SqlCommand(command, connecetion);
SqlDataReader reader = commn.ExecuteReader();
while (reader.Read())
{
Block_IDsList.Add(reader.GetInt32(0));
}
connecetion.Close();
return Block_IDsList;
}
将每个索引包含在每行的id中
will each index in the consist of id of each row
推荐答案
这篇关于我想逐行阅读就是这样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!