/// <summary> /// Initializes a new instance of the <see cref="SerializerCSV{T}"/> class. /// </summary> public SerializerCSV() { this.PropertyValueConverters = typeof(T).GetProperties().Select(x => { if (x.PropertyType == typeof(DateTime)) { return(Tuple.Create(x, (Func <Object, String>)(o => CSVExport.FromDate((DateTime)o)))); } else if (x.PropertyType == typeof(DateTime?)) { return(Tuple.Create(x, (Func <Object, String>)(o => CSVExport.FromNullableDate((DateTime?)o)))); } else { return(Tuple.Create(x, (Func <Object, String>)CSVExport.From)); } }).ToList(); }