In mvc 4 c# view page:-
@{
IEnumerable
}
@if (TempData["Message"] != null) {
var listTopline = TempData["Message"] as EMGUI.ViewModel.TopLineToExposure;
var ListGroupIds = listTopline.GroupIds;
ListGroupID = ListGroupIds.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries).Distinct();
}
Problem: when I am tring to use 'ListGroupID' inside foreach there is error occuring "ienumerable string use of unassigned local variable". How to solve this?
@foreach (var item in ListGroupID)
{
}


Guest UserRank #816 · 2.8K reputationPosted Jan 28, 2016, 2:46 AM EST
Abhilash J ARank #1,243 · 1.4K reputationPosted Jan 28, 2016, 3:03 AM EST