So far we have seen, Property can be initialized only in the constructor, and if it has any backing field defined, that can be initialized where it is declared. C# 6.0 introduced a new features called “Auto-Property initializer” that allows property to be initialized like fields in the same line where it has been declared.
Formatting the string values are very common during development. We generally use String.Format() method, that replaces each format item in a specified string with the text equivalent values from the objects. While this is a common, sometimes this is confusing and produce error. Because, we need to specific the place holder for each item and then map them… Read More »
C# 6.0 introduced many small and useful features that helps developers to write clean code. On of such feature is “Using Statement with Static Classes”. We know a static class cannot be instantiated. While using any static member, we find ourselves repeating the class name to access any of the static members. It looks kind of redundant which… Read More »