I am making function for exporting table to .csv file.
I have List where T is custom class.
I need property names of T for columns in .csv file.
How can I extract them to other List ?
>Solution :
You can use reflection:
var propertyNames = typeof(T).GetProperties()
.Select(p => p.Name));