I need help understanding this
In my controller I have
MembershipUserCollection usersObj = Membership.GetAllUsers();
IEnumerator<MembershipUserCollection> model = usersObj.GetEnumerator();
return PartialView(model );
I need an IEnumerator object to iterate through but I am not sure which type of IEnumerator MembershipUserCollection.GetEnumerator() returns.
I want to pass this IEnumerator to a view and there I´ll use this Enumerator inside of a foreach:
@foreach (var membershipUser in Model.getEnumerator())
{ ... }
GetEnumerator() Returns an enumerator that iterates through a collection.
Collection must meet the following requirements:
for more information see the link below:
http://msdn.microsoft.com/en-us/library/system.collections.ienumerable.getenumerator.aspx