
Async Main in C# 7
In C#7 there is an enhancement in the main method Async Main in C# that will allow you to await in your main method. Let me show you an example of how it was in C#6 and then how it…
Practical guides on AI agents, LLM security, C#/.NET and Cloud, from Taswar Bhatti
Practical guides for developers, by Taswar Bhatti.

In C#7 there is an enhancement in the main method Async Main in C# that will allow you to await in your main method. Let me show you an example of how it was in C#6 and then how it…

In C#7 there is an improvement on using out parameter. Some of you may remember writing code like below. string hourString = “5”; int hour; if (int.TryParse(hourString, out hour)) { Console.WriteLine($”The hour is {hour}”); } The improvement that C#7 brings…

In C# 7 there the new feature called Local functions in C#. Basically Local functions allow one to write a function within the body of another method or function. It comes in handly in the case lets say you are…

In C# 7 there are Expression Bodied Accessors which allows you to write getter and setters somewhat more functional way, somewhat lambda’ish. Let me show you an example. You may remember the old way of writing getter and setters like…

In C#7 there are Digit Separators and Binary Literals which were added. One may wonder what these are? Basically you can replace long number values with underscore (_) such that code readability is improved. Let me give you couple of…