c# - Using the generic type 'System.Collections.Generic.List<T>' requires 1 type arguments -


I have two methods that are code here, so I apply the following code to your project, I have a problem .

  using the system; Using System.Collections.Generic; Using System.Linq; Using System.Web; Using System.Web.UI; Using System.Web.UI.WebControls; Using System.Data; Using System.Data.SqlClient; Using Microsoft Reporting. Webform; Using System.configuration; Using System.Web.SessionState; Using RLISDev.Models; Using RLISDev.BaseObjects; Using System.Web.Mvc; Using RLISDev.Extensions; Using RLISDev Annotation; Using System.Collections; Safe Override Zero OnPreRender (EventArgs e) {base.OnPreRender (E); DatePicker1.Value = string.Join ( ",", (New & gt; list (GetDateParameters ()) toArray ()).); } Private IEnumerable GetDateParameters () {// I think this report visual control ID // ReportViewer foreach (as ReportParameterInfo information ReportViewer1.ServerReport.GetParameters ()) {if (info.DataType == ParameterDataType.DateTime ) {Yield return string. Format ("[{0}]", info.Prompt;); }}}  

And I error got here

list (GetDateParameters ()). ToArray ()) General Type 'Use System.Collections.Generic List' requires 1 type of arguments

I'm not sure what I'm remembering.

As it is a general category, it is the kind of logic:

var test = new list & lt; DateTime & gt; ();

The return type GetDateParameters () based on; Some of you are:

  DatePicker1.Value = string.Join (. "", (Date of Date & gt; (GetDateParameters ()) toArray ())) ;  

Comments