Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to convert Dataset to Object Array or list in c# .net

Answers were Sorted based on User's Feedback



how to convert Dataset to Object Array or list in c# .net..

Answer / mohan

DataTable dt = ds.Tables[0];
List<Employee> emp = new List<Employee>();
foreach (DataRow dr in dt.Rows)
{
Employee em = new Employee();
em.Name = dr["Name"].ToString();
em.age = Convert.ToInt32(dr["Age"]);
em.Salary = Convert.ToInt32(dr["Salary"]);
emp.Add(em);
}

Is This Answer Correct ?    13 Yes 6 No

how to convert Dataset to Object Array or list in c# .net..

Answer / san

http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/24b786da-fc87-4264-b934-5a0381ca6bdc

this one works fine.

DataTable dt = ds.Tables[0];
List<Employee> emp = new List<Employee>();
foreach (DataRow dr in dt.Rows)
{
Employee em = new Employee();
em.Name = dr["Name"].ToString();
em.age = Convert.ToInt32(dr["Age"]);
em.Salary = Convert.ToInt32(dr["Salary"]);
emp.Add(em);
}

Is This Answer Correct ?    13 Yes 10 No

how to convert Dataset to Object Array or list in c# .net..

Answer / sona

1-->
http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/5b1c29e2-bf37-4dd2-be39-50d27abb188e

2-->
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/8d3834a8-2749-4bd6-a32b-f8a162a5b641

3-->
http://programming.top54u.com/post/ASP-Net-C-sharp-Convert-DataSet-to-ArrayList.aspx

4-->
http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/24b786da-fc87-4264-b934-5a0381ca6bdc

Is This Answer Correct ?    4 Yes 3 No

how to convert Dataset to Object Array or list in c# .net..

Answer / merca

just find here some good samples og dataset in C#

http://csharp.net-informations.com/dataset/csharp-dataset-
tutorial.htm

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More ASP.NET Code Interview Questions

how the value of label is printed through a button in asp.net web application

3 Answers  


How to Bind Nested XML to a Repeater Control with Container.DataItem?

0 Answers  


Give coding for Exception Handling Techniques in ASP.NET?

3 Answers   Microsoft,


Code for Presenting Parent/Child Data in a Data Grid Row?

0 Answers   TCS,


how to track links visited in google using iframes

0 Answers  


How we implement the paypal in my website and how we make a payment through Credit Card.

2 Answers  


How to Snap the Cursor to a Button?

1 Answers  


ArrayList declaration in .net

0 Answers  


How to get Dynamically Linked Comboboxes Set?

0 Answers   HCL,


Listview design in .net

1 Answers  


Code for Sending E-Mail with System.Web.Mail?

2 Answers  


How to Create Scrollable Micro Windows?

2 Answers  


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)