Its the little things...
In the history of C# we have been spoiled by every version having excellent new language features in. We had Generics, Linq, Tasks, async/await which were massive hitters and transformed the way we worked and wrote code. C#7 however I found has given us lots of little improvements that make things smoother and easier which has been great. One feature I hadn't really used yet though was the new Pattern Matching , this wasn't because I hadn't wanted to but more I hadn't seen a time to really use it. That was until tonight. A year or so ago I had a scenario where I had to take a base type and then1 return the appropiate mobile view to render. Prior to Pattern Matching I ended up with something like: if (value is HoldingPage) return new LoadingView(); } var listingPage = value as ListingPage; if (listingPage != null) { return new ListingView(listingPage); } Tonight I needed to add a new view into this code and decided it needed tidying up. Pattern Matching...