Convert SelectList to List<T>

Sanhita Roy 1 Reputation point

Can you please show how do I convert SelectList items to generic list


public SelectList Countries { get; set; }


public List<EmissionCountry> Countries { get; set; } = new List<EmissionCountry>();

I want to convert all the select list items into the list

 public static Emission MapUserDetailViewModel(UserDetailViewModel viewModel)         
return new Emission             
Countries = viewModel.Countries,                 
MarketSegments = viewModel.MarketSegments,                 
InquiryTypes = viewModel.InquiryTypes             

I am getting error cannot implicitly convert type system.web.mvc.selectlist to system.collections.generic.list<EmeaWebsite.Model.EmissionCountry>

Microsoft Technologies based on the .NET software framework.
3,472 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,689 questions
{count} votes