Given the code block below (source: http://www.asp.net/learn/mvc/tutorial-31-cs.aspx)... I receive this error: Using the generic type 'System.Collections.Generic.List' requires '1' type arguments
I can pacify this by simply modifying my declaration to read as: var groups = new List<string>();
Is this just a case of invalid syntax in the example code? I ask here, however, because I've run into this more than once and am wondering if there's some kind of VS.NET "strictness setting" that might be at play in my VS environment.
public class GroupController : Controller
{
public ActionResult Index()
{
var groups = new List();
return View(groups);
}
/// another example...
Assert.IsInstanceOfType(result.ViewData.Model, typeof(IEnumerable)); // same error
Assert.IsInstanceOfType(result.ViewData.Model, typeof(IEnumerable<string>)); // corrected
}