C# 8.0 – Platform dependencies

Many of the C# 8.0 language features have platform dependencies. It’s been almost 20 years since Microsoft released the first version of the C# language. From its inception — when some unjustly deemed it a mere Java copycat — until now with the release of C# 8, the language has […]

C# 8.0 – the SWITCH expression

C# 8 introduces switch expressions, which enable the following: terser syntax, returns a value since it is an expression, and fully integrated with pattern matching. The switch keyword is “infix”, meaning the keyword sits between the tested value (here, that’s o) and the list of cases, much like expression lambdas. […]

Visual Studio 2015

Turn every Class into a Singleton!

You can design any C# Class as a Singleton Class. By doing so you can not use it any other way. Or you can design your Classes as Standard Classes and turn them with this Class into a Singleton: 1234567891011121314internal static class Singleton<t> where T : new() { private static […]

C# version 7.0 features

C# 7.0 is the seventh version of C# that has build up on since 2015. This version contains some new features: language support for Tuples, local functions, out var declarations, digit separators, binary literals, pattern matching, throw expressions, ref return and ref local and extended expression bodied members list.

Visual Studio 2015

New in C# version 6.0 – AWAIT ASYNC in Catch/Finally

Finally a Long missing Feature has arrived: in C# 6.0 (check out the public preview of Visual Studio 2015) you will be able do await asynchronous operations within the CATCH and/or FINALLY block! 1234567891011121314151617public static async void DownloadAsync() { try { throw new Exception("Error"); } catch { await Task.Delay(2000); WriteLine("Waiting […]

windows 10 one OS for all platforms