embed sample XLSX, employ usings & var
DickBaker opened this issue · comments
consider this GH example
- opens the sample InputTemplate.xlsx in 3 folders higher [i.e. the program source directory] which is bad practice because would be wrong on deploying to PROD [like good chefs your never reveal your sauces!]. Instead I propose you mark that xls to be copied to target folder on build, so then available in target to both dev and prod
- uses legacy explicit type, i.e. does not reflect current "var" guideline of using implied type
- legacy use of .Close() does not accord with best practice to wrap disposable objects within a using block [or statement for method scope], which will protect against any exceptions
- I would prefer file-scoped namespace instead of legacy block-scope
- this GH project does not contain the necessary .gitignore file, so any unwitting PR would contain all bin/obj/debug detritus
I will submit a PR (items 1-3) for consideration by SF, but the above issue occurs elsewhere and needs fixing throughout.