User-1045082127 posted
hi
list of data is send to the bellow fuction:
public static DataTable SetPropertyToDataTable<T>(T dataList,Type _class) where T : class
{
Dictionary<string, object> columns = new Dictionary<string, object>();
var data = dataList as T[];
var properties =_class.GetProperties();
/* foreach (var item in T)
foreach (var property in properties)
{
var name = property.Name;
var value = property.GetValue(item, null);
if(!columns.ContainsKey(name))
columns.Add(name, value);
}*/
return ImportPropertyAndValues(columns);
}
bu when i trace a data value it contain null. why?