Private void IntializeStudentDataValues(List<StudentDataList> studentList)
{
if(studentList != null)
{
foreach(var student in studentList)
{
switch(student .StudentName.ToUpper())
{
case "A":
//Do Something
Case "B":
//DoSomething
}
}
}
}
i am having "IntializeStudentDataValues" for having foreach loop for "studentList". Instead of this i would like to have one foreach where i have it for locationList. I want to write one foreach for both cases. I want perform
switch case in this foreach(Location location in locationList).
Bookmarks