I have an enum defined as
public enum SecurityRole { Admin = 0, ViewLog = 1, DeleteLog = 2 } and want to use the technique described here to get a List<SecurityRole>.
Thus the line
var lst = Enum.GetValues(typeof(SecurityRole)).Cast<SecurityRole>().ToList(); should work, but IntelliSense wont allow the .ToList property
I am using System.Linq. Is there some other reference I need?
.beforeToList()and press the.if that fails press Ctrl+Space to bring up intellisenseusing System.Linq