tola Ibironke

tola Ibironke

  • NA
  • 8
  • 2.8k

c# programming

Sep 4 2014 9:52 PM
I am new to c# and mvc and i'm trying to learn this stuff by myself. Can anybody help me please.
 
I created this two tables
 
public class TVListData
{
public string Message { get; set; }
public List<ListElement> Rows { get; set; }
public string Status { get; set; }
}
 
 
public class ListElement
{
public string Description { get; set; }
public string Id { get; set; }
}
 
 
 
public List<TVListData> GetErrorCodes()
{
return GetList("get_error_code_list");
}
public List<TVListData> GetWarranties()
{
return GetList("get_warranty_list");
}
private List<TVListData> GetList(string listData)
{
foreach ()// I want to iterate through but i'm not sure what to iterate here
{
   //i'm not sure of what to do here 
}
return new RTCListData
{
    //i can do object initialization here
};
Thanks,
 
tola 

Answers (4)