.net - How to pass List<string> to constructor in c# -


how can pass list constructor

i trying this

 private void button1_click(object sender, eventargs e)     {         step2 st2 = new step2(list);     }     

but write in constructor definition

 public step2()     {         initializecomponent();     } 

any suggestion welcome

you need define parameter in constructor. example.

 public step2(list<type> list)   {   } 

where type list type, i.e. list<string>


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -