KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How to cast/convert a var type to a List type? This code snippet is giving me error: 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(); }
Tags (comma-separated)
Save Edits
Cancel