matthidinger / DoddleReport

Generate custom reports (PDF, Excel, etc) from any IEnumerable datasource.
MIT License
130 stars 40 forks source link

Update examples to use nameof(Class.FieldName) #15

Open jzabroski opened 6 years ago

jzabroski commented 6 years ago

Update examples to use nameof(Class.FieldName) instead of hard-coded strings:

See my code review here: https://github.com/matthidinger/DoddleReport/commit/d68c344d1b012937c7ff5b9c6e9233d421d1995e#r30912841

Fix:

report.DataFields[nameof(Product.Price)].DataFormatString = "{0:c}";
report.DataFields[nameof(LastPurchase)].DataFormatString = "{0:d}";