Environment: asp.net fx3.5
given
public class Product
{
public int ProductId { get; set; }
public string ProductName { get; set; }
public decimal UnitPrice { get; set; }
}
i have a List<Product>
collection.
is there a way to get the property names because i want them to be a header row in my csv file that i'm constructing?
so the result i'm looking for is a string = "ProductId,ProductName,UnitPrice"