i have a list
List<SalesDetail> SalesList = new List<SalesDetail>();
SalesDetail detail = new SalesDetail();
where "SalesDetail" is a class. i have a button (add) and my code on click event of add button is SalesList.Add(details); where details is object of class SalesDetail which contains public variables with {set; and get;}
but when i try to retrieve each item of the list then i only get the last item. my code retrieving each item is
foreach(SalesDetail sd in SalesList)
{
messageBox.show(SalesList);
}
in my class SalesDetail i have following code
Public string Brand{get; set;}
Public string Product{get; set;}
i want to retrieve each item from list and save it to database i would like to know where i have made mistake while retrieving the data.. please help Regards bunzitop