Programming

OData Protocol

OData Protocol (Open Data Protocol) was released by Microsoft in 2007. The current version has been upgraded to 4.0. Now OASIS (Organization for the Advancement of Structured Information Standards) has approved this protocol standard. OData is based on REST principle to offer HTTP CRUD service. This protocol also provides special query language expression to help

OData Protocol Read More »

C# Enum

Enum is a value type which can be byte, short, int and long. We can use enum to avoid the occurrence of magic number. For example:         var season = dateSeason == 1 ? “Spring” : “other season” you might notice that when the project grows bigger, there will be more magic numbers you generate.

C# Enum Read More »

C# Delegation

C# delegation works like C/C++ function pointer (type safe). We can use delegation as the parameter of a method and pass them between methods. This helps the programmer to follow one of SOLID principles – OCP. By using delegation, we don’t have to write long and tedious if-else or switch statements. The example of using

C# Delegation Read More »