R
Raymond Chiu
If I have created the data class, how can it be used in creating datatable
with looping data class field?
e.g.
public class PriceData
{
public string Code { get; set; }
public string Description { get; set; }
public string Currency_Code { get; set; }
public decimal Unit_Price { get; set; }
}
..........................................
DataTable dt=new datatable();
while (looping all price data field)
dt.columns.add( price data field[index]);
loop
What the code should be???
with looping data class field?
e.g.
public class PriceData
{
public string Code { get; set; }
public string Description { get; set; }
public string Currency_Code { get; set; }
public decimal Unit_Price { get; set; }
}
..........................................
DataTable dt=new datatable();
while (looping all price data field)
dt.columns.add( price data field[index]);
loop
What the code should be???