by jeswin · 7y ago · 0 comments
Static using directives! Certainly a useful tool, thank you. I had been away from the .Net universe for a while and I think I have some more catching up to do. Some of the newer changes in C# help a lot with reducing code heft, even though it makes the language more complex.
However, the Framework seems to be headed in the opposite direction when it comes to simplicity. Here's for example the IOptions pattern: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/co...
https://laurentkempe.com/2019/09/03/WPF-and-dotnet-Generic-H...
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/ho...
Makes testing easier too because you don’t have to write a fixture around your settings. Just build the class with known setting values without writing code purely for testing.