Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

lista generica como parametro de un metodo en c#

List<Employee> emp = new List<Employee>();

//Maintaining DataTable on ViewState
//For Demo only

DataTable dt = ViewState["CurrentEmp"] as DataTable;

//read data from DataTable 
//using lamdaexpression


emp = (from DataRow row in dt.Rows

   select new Employee
   {
       _FirstName = row["FirstName"].ToString(),
       _LastName = row["Last_Name"].ToString()

   }).ToList();
Source by www.it-swarm.dev #
 
PREVIOUS NEXT
Tagged: #lista #generica #como #parametro #de #metodo #en
ADD COMMENT
Topic
Name
6+9 =