Features of C# 7.1 and 7.2


C# 7.1 Features

In the previous article we have looked in to the features of C# 7.0,  in this article we will see the some of the features  introduced in C# 7.1 and 7.2

C# 7.1 August 2017 .NET Framework 4.6.2 Visual Studio 2017 version 15.3

Default literal expressions

When we declare the local function or variable or methods until C#7.0 we need to instantiate that in the code, but the newer version of C# not necessary to create a default type of that value.

In C# 7.0

Old_Default literals

In C# 7.1

Here we don’t want to specify the type of the function or variable, by default its taking.





Tuple Name inferred

The names of tuple elements can be inferred from tuple initialization in many cases.

In C# 7.0







In C# 7.1

Here we don’t want to give the name, its taking from the variable name itself.


Async and Await in Main method

The purpose of it is for situations where your main method calls one or more async methods directly. Prior to C# 7.1, you had to introduce a degree of ceremony to that main method.








In C# 7.1









Pattern Matching with Generics

We have already got enough information about Pattern matching in C# 6.0 itself, now in C# 7.0 added some additional feature like “Pattern Matching with Generics”, in the previous version there is a design flow in the pattern matching with switch case statement.


Here the compiler indicates an error, because we cannot match the pattern with generics, so in order to avoid the problem in the next version introduced the feature.












C# 7.2 Features

Private Protected

This is the new access modifier in C#, previously we had private, public, protected and so on, this feature is enable the possibility to access the private member from the parent class and that too within the same assembly.


Non-trailing named arguments

In C# 4.0 a new type of argument is introduced known as a named parameter. Using this feature, we can specify the value of a parameter by parameter name regardless of its ordering in the method.

Non-trailing named arguments








Here we can give the parameter in any order with the specified named parameter.

Leading underscores in numeric literals

The implementation of support for digit separators in C# 7.0 didn’t allow them _ to be the first character of the literal value. Hex and binary numeric literals may now begin with an _.

Reference semantics with value type

out: option to set the value

ref: Should set the value before passing it.

in: This method does not modify the value of the argument used as this parameter.

The “in” keyword specifies that you are passing the parameter by reference and the called method does not modify the value passed to it.



I hope this article will help much to understand the features of C# 7.1 and 7.2.


C# 6.0 Features Overview

C# 6.0 Features.

C# is a general-purpose programming language, it’s an elegant and type-safe object-oriented language that enables developers to build a variety of robust, secure applications in .NET framework.

C# 6.0 July 2015 .NET Framework 4.6 Visual Studio 2015

Read-Only Properties

Properties are an extension of data field in C#, data fields are not directly accessible from outside class, we must use the GET, SET methods to access it.






In general, read only properties allows the properties to set only inside the scope, outside classes can only read.






In C# 6.0, it is not necessary to specify the private set, by default it’s a read-only property when we don’t have a SETTER





Auto-Property Initializer

An auto-property initializer allows you to set the value of the property at the same time you declare it in a class, in the earlier version we need to set the property value in the constructor.

In earlier version of C#








In C# 6.0

Auto-Property Initializers



Expression bodied function member

Expression-bodied function members allow properties, methods, operators and other function members to have bodies as lambda like expressions instead of statement blocks. Thus, reducing lines of codes and clear view of the expressions.

In earlier version of C#, the function will be like.





In C# 6.0


So, we can directly write the body as an expression here.

Using static

The using static enhancement; enables you to import the static methods of single class. Previously, the using statement imported all types in a namespace.

In earlier version





C# 6.0





Null-conditional operators

It’s a new feature in C# 6.0 which will bring more productivity for the developers by reducing the number of lines.

In earlier version




In C# 6.0




String interpolation

This feature inserts values into a string with simple syntax. It is similar to string.Format, but variables may be accessed directly (not through index arguments).

In earlier version





In C# 6.0






Exception filters

If you want to use Exception Filter, you have to declare it in the same line where you declared the catch block, just like this: catch (Exception ex) if (FilterIsTrue). Here, if the parenthesized expression after the “if” returns true, the associated catch block will execute. Otherwise, it will move forward.









nameof Expressions

Evaluates to the name of a symbol

In earlier version






In C# 6.0






Await in catch and finally blocks

In earlier version of C# itself we can use try, catch and finally blocks together but was not able to use the Async and await in catch and finally blocks, so the next version of C# 6.0 introduces the features to use the await in catch {} and finally {} blocks without any complicated structure.

The await operator is applied to a task in an asynchronous method suspend the execution of the method until awaited task completes, the asynchronous method in which await is used much be modified by the Async keyword.








Index initializers

Initializing dictionaries and other objects with indexers is less elegant. We are adding a new syntax to object initializers allowing you to set values to keys through any indexer that the new object has

In earlier version







In C# 6.0









I hope this article would help to understand the features of C# 6.0, in the next article we will see the features of C# 7.0

From Functional to Reactive Programming

GIDS’17 Conference

As an attendee, I’m very much happy and I have gained some knowledge from GIDS 2017, and I would like to share the insights which I gained out of this conference.

I wish to share about the session “From Functional to Reactive Programming” given by Dr. Venkat Subramaniam, he is an excellent speaker, the session was very interesting and more interactive, the way he explained the concepts was really awesome.

From Functional to Reactive Programming:

What is Reactive Programming?


Reactive Programming is an asynchronous programming paradigm oriented around data streams and the propagation of change. This means that it should be possible to express static or dynamic data streams with ease in the programming languages used, and that the underlying execution model will automatically propagate the changes through the data flow.

Mostly as a software developer, we are writing code for quick solutions. But that code is not responsive and feasible even though it gives solution for that problem. In Reactive programming, it simplifies the codes and gives feasible and highly responsible solutions.

Imperative to Functional Style:


Imperative, every programmer knows this style and most of the institutions teach this style, programmers gain significant experience with its style. But using functional style, we can avoid writing lot of code inside the function for simple calculations.

In this example, we are finding the first even number which is greater than 3 and doubling it. This is imperative style that too very complex. The same example in functional style,

Its clear, concise and readable code, and lets you focus on solving the problem rather than the required procedure.

Function composition:

composition-of-functions (1)

Function compositions means create a simple and reusable functions that we can combine to compose new function. In the about example we created small functions like isGreaterThan3() for finding number that is greater than three, isEven() for finding whether the number is even or not and doubleIt() for doubling the number. Then finally we have combined these functions to get the result.

Lazy Evaluations:

lazy (1)

Lazy evaluation is the program will not evaluate the expression until just-in -time when its value is needed. If the value is not needed during the execution of the program, the evaluation of the expression will be skipped.

In the above example the program will not evaluate the expression until we calling the findFirst() function. This function only triggering the program to filter isGreaterThan3() function, isEven() function and doubleIt() function.

Benefits of lazy evaluation:

The ability to define control flow

The ability to define potentially infinite data structures

Increase performance by avoiding needless calculations

Functional Reactive Programming:

Reactive programming also called functional reactive programming because it applies functions like lambdas and closures in a reactive manner asynchronous sequence of data. Reactive programming paradigm stays responsive in the face of failure, more responsive and responds in timely manner. An example of the reactive systems is Google Spreadsheet. The library Rx-Java used for reactive + functional programming in java 8.

Thanks to Dr.Venkat Subramaniam,  is an award-winning author, founder of Agile Developer, Inc., and an adjunct faculty at the University of Houston.

GIDS 2017

Mr. S. Sheik Mohamed

Ramarson Technology Developers LLP, Trichy, Tamilnadu, India.

Great Indian Developer Summit (GIDS) 2017 at Bangalore.


GIDS is one of the best developer summit in India, it’s an excellent opportunity to upgrade our knowledge to the current  Market requirements, speakers from all over the world shared  their knowledge and current trends in the IT industry. There are lots of delegates participated in that event, they talks about 10 important technologies to change the developers landscape, which is a highlight in the GIDS 2017. The speaker Mr. Arun Gupta – vice president of developer advocacy at couchbase explains the technologies and concepts very interestingly to the audience. He gave the summery about Containers, Micro services, CI & CD, DevOps, IoT, Server less, Virtual & Augmented reality, AI & Machine learning, Block chain, ChatOps, he explained  the overview of these  technologies and how they lead in the technology world in few years  to the developers concerns and how they change the developers activities and so on.



The interesting thing was about the containerization concepts, because the deployment is really painful when we are building the large scale application and deploy into the customer side. The developers are facing so much of problem while fixing it in the customer side, so the containers will overcome those problems and make a smooth deployment in the customer side. Now a day the containers play a vital role and great feature for the developers to make the life easier. Followed by a lot of speaker explains the trends and technologies about cloud platform from Amazon, Google, etc., they talks about how the cloud is playing the important role in the current industry and 12 factors to cloud success and how Docker image is important and what benefits its bring out from kubernetes in the deployment also interesting in the GIDS.

Now a days IoT is one of the hot topics in the industry, people are moving towards more and more to automate the things to reduce the human efforts. I gained some clear picture about how the systems are connected each other and how they  are talking thru the cloud platform, little things about UPnP protocols in the Internet Of Things, how its evolving in the technologies are very interesting.



Mr. Venkat Subramaniam, founder of agile developer explains the Functional to Reactive programming techniques.  He performed a coding  session about concepts like Functional compositions, Lazy evaluation, immutability, declarative programming vs Imperative programming, it  really grabbed  the attention of developer, and got good understating about why the reactive programming is important to the developers, how its changing their life, how do we become a smart programmers in the software development and so on.

Finally, GIDS 2017 was really very interesting event I attended this month and it brings a lot to know for the software developers to become a smart developer in the world!!!

Golang Http Middleware

Http Middleware

Http Middleware is a shared functionality, using that we can log every request, gzip every response and check a cache before doing some heavy processing. Http Middleware has a single responsibility; we can plug it in our app at the interface level, it doesn’t affect our coding style like another layer in our request handling cycle. It is a pluggable and self-contained code, if we really want middleware we can plug it or if don’t want just remove it.                         wsgi_middlewareUsing middleware in Golang is very simple, we have to use middleware between a ServeMux and application handlers. The Http Middleware function accepts a handler as a parameter and returns a handler so that we can directly register the Middleware function with the ServeMux.

Middleware Chaining

T_AspNetCoreStartup_02In Golang, we can create handler chain by nested middleware functions inside another function. We can share values and also pass errors from one handler to another using middleware chaining.


This is an example of middleware chaining; we are passing the handler to “middlewareOne” as a variable, then transfer the control to the next “middlewareTwo” and then finally “loggingHandler”. This is necessary to know the control flow of middleware handlers, chain with other middleware handlers.

In Golang we can use Http Middleware for some specific handlers, no need to use it for all handlers. There are some third-party packages offers such kind of facilities.

Third-Party Middleware                                  

In Golang, we can use third-party package middleware instead of using our own middleware all the time. Well known third-party packages are Gorilla’s package and Negroni package.


The Gorilla package has collection handler for use with Golang’s net/http package. It mainly offers handler for logging, compressing http request and responses, validating content types.

Negroni provides an idiomatic approach to use Http Middleware in Golang. It supports to use net/http handlers, and also offers a way to handle Http Middleware. Negroni package offers middleware functions for logging handlers and to use the middleware functions some specific routes.


The Http Middleware is one of the advantage in Golang, by using this we can log each http request, gzip all responses and also we can check the cache before doing some heavy processing. The flow control of middleware handler is very useful and effective, also we can use middleware functions for specific routes.


Summary of “Golang”


For the past few days I was engaged in learning a new programming language called “Golang”, it’s a simple programming language for developing robust scalable software applications. I have explored many new things in the learning session.  I would like to share my ideas and my learning experiences On Golang programming language.

Go Vs other programming languages?


Golang is a general purpose programming language which can compete with C and C++ languages, Go has a simple syntax with a minimum set of standard key words, the interesting thing with Go is, one can build complex applications, with simple programming model. We can put our effort in higher level abstract things. When we look the syntax of Golang, it eliminates lot of standard which are usual in C#, Java or C++. Go inherits many concepts from C language. To give few example, like how simple the language is, we don’t need to specify a semicolon (;) to terminate the line, no access modifiers in Golang. We can do it by declaring the function name starting with upper case or lower case. Most important things are, its compilation time is much faster than other languages, and even compiling very large projects is done in few minutes.

Generally, it eliminates some standard patterns from Programming Language Theory, the language designers have made it simpler to achieve more performance in critical real world application. The compiler directly converts from high level language to machine language, i.e. we don’t need any intermediate steps like JVM for Java, so the compiler quickly builds the application. Once the basic syntax in “Golang” is familiarized, we can develop application with its inbuilt standard packages without depending on any 3rd party Frameworks/tools.

Go for Fresher’s than experienced developers


I would say comparatively Golang will be more attractive to the fresh software engineers than the experienced developers, because when we start working with Golang its provide very simple syntax to concurrent programs. The learning curve is bit faster, but for the experience developers it will take some time to understand the core benefits of Golang programming language because for the past few years If someone developed their real world application using Microsoft technologies or any other technologies, it will not be so easy to quickly adapt this new language, it will take some time to understand the language features. Once core concepts are understood, one can build real world applications.

“Unlearn something to learn new things”

Go syntax is really different than other programming language, for example: We don’t need while loop but we can achieve the same thing via “for” loop, so by learning one looping statement we can do the same thing what we did for other programming languages, so it gives flexibility to build the application.

Concurrency with GO


I have learned concurrency mechanism in this session. It is one the core feature of GO, very useful and we can use the standard library packages rather than using any additional packages like a TPL and so on, with simple keyword we can execute multiple function concurrently using the keyword “go” calling a routine, so the go routines will be running independently and automatically, this will increase the performance as well, here the channel is playing the important roll to synchronize the go routines.

Go with Interfaces

Go provide language features like interface and inheritance. Similar concepts like in other languages, we achieve the same thing what we achieve in other programming languages like C#, which means I would not say Go programming language is perfect object oriented programming languages.

Comparing to other Object Oriented languages. Go is much simpler, for defining the interfaces and types and implementing those interfaces by concrete methods on respective struct, so the compiler will check who are all implementing those methods from the Interface, they can have an access to the interfaces. Its bit difficult to grasp or understand the things who came from traditional object oriented programming.

Go With Web

We can create web application using standard library package called “http” and some sub packages as well, here the http middle ware stuffs is interesting to manage the shared functionalities, i.e. log the application trigger or any other authentication mechanism in the real world application and so on. JWT is also important concept to understand the token based message exchanging mechanism of JSON data across the client and server.  There are lot of built in packages available to extend the application and customize more.

Unit testing


This particular section was really interesting for writing unit test for our application, here we are simply using the “testing” shared library packages and start writing the unit testing, for the assertion we can use Omega packages, but we don’t want to mention the packages as well, there are lot of interesting points in the unit testing, because it provides some interesting features like “Benchmark” test, it is really useful to benchmark the flow and produce the average result across different scenario, another interesting things is we can run the unit tests in  parallel and can skip some long running unit tests using a flag by command line.


Overall the session was really useful to understand the concept of new programming language and to understand why its differ from other languages and so on, for me the interesting features which attracted myself to GOLANG   is its concurrency, channels, interfaces, inheritance, unit testing, packages, so overall Go is a language, easy to learn for fresher’s compare to the other experienced developers, because they can quickly understand and adopt. An experienced C# developer, will take some time to understand the changes, if someone is open minded and willing to unlearn some standard programming concepts he learned and practiced in Java or C#.

One needs to put some more effort and change the way he programs to speed up the learning process and use Go for building complex robust scalable solutions.

Thanks to Mr. Siju Varghese, Solution Architect who specializes in Go cloud and Docker.