如何将 var 类型转换/转换为 List 类型?
此代码片段给了我错误:
List<Student> studentCollection = Student.Get();
var selected = from s in studentCollection
select s;
List<Student> selectedCollection = (List<Student>)selected;
foreach (Student s in selectedCollection)
{
s.Show();
}