Q: How to resolve error "Using the generic type 'List' requires 1 type argument"? I am getting the following error and have tried looking at various post here on SO but can't find a solution the the problem I am experiencing:
Thi is my code I have (FYI this is to get the datepicker to work in Chrome using ReportViewer) and the link where this code is:  https://rajbandi.net/2012/04/03/fixing-ssrs-report-viewer-control-date-picker-in-google-chrome/
Here is the code:
protected void OnPreRender(object sender, EventArgs ex)
{
    base.OnPreRender(ex);
    DatePickers.Value = String.Join(",", (new List(GetDateParameters()).ToArray()));

}
private IEnumerable GetDateParameters()
{
    foreach (ReportParameterInfo info in ReportViewer2.ServerReport.GetParameters())
    {
        if (info.DataType == ParameterDataType.DateTime)
        {
            yield return string.Format("[{0}]", info.Prompt);
        }
    }
}

I get the error under List
Thanks

A: Assuming you're using a relatively recent version of .NET, just change GetDateParameters to return an IEnumerable<string> and you can get rid of some of that other stuff:
protected void OnPreRender(object sender, EventArgs ex)
{
    base.OnPreRender(ex);
    DatePickers.Value = String.Join(",", GetDateParameters());

}
private IEnumerable<string> GetDateParameters()
{
    foreach (ReportParameterInfo info in ReportViewer2.ServerReport.GetParameters())
    {
        if (info.DataType == ParameterDataType.DateTime)
        {
            yield return string.Format("[{0}]", info.Prompt);
        }
    }
}


A: You can't create a new List(), but you can create a new List<string>() (GetDateParameters should also return IEnumerable<string>) .
