Getting description of Enum in C#?

In this code snippet we will look an easy way to get description of Enum. Lets discuss a simplest way, just need to define an extension method: Our pre-defined Enum: Define an extension method: Do not forget to add following namespace, in above: Now, call this extension method as: Above will give you: ‘Advance’.

August 12, 2015 | by

Sql Like functionality in LINQ?

In this code snippet we will create an extension method which will add functionality similar to functionality of SQL ‘Like’ ‘Can we use a ‘Like’ functionality in LINQ, which contains same functioning as ‘Like’ in SQL’? Are you going to say ‘No’, wait just read this snippet and you will say ‘Yes’ 🙂 First, lets…

August 12, 2015 | by

IsNullOrEmpty for Generic collections in C#

In this code snippet we will see creation and implementation of IsNullOrEmpty for collections. Can I implement IsNullOrEmpty for my Generic collections/lists ? Its out of C#. Unfortunately there is only one method which is of a String method String.IsNullOrEmpty() available, framework does not provide us such things. What is the solution for this. A…

August 12, 2015 | by

Calling an API using RestSharp in ASP.NET

In these days Rest Services are most popular, everyone like to use Rest Services. RestSharp is a Simple REST and HTTP client for .Net There are many ways to consume RESTFull services in client veg. WebClient etc. But, RestSharp is the wonderful to consule REST services. This provides a simple call while we want o…

August 12, 2015 | by

Solidifying your code using SOLID Programming Principles

[spacer height=”10px”] Contents Abstract Myths related to S.O.L.I.D. I know OOPS then why I learn S.O.L.I.D. I Know Design Patterns then why I learn S.O.L.I.D. SOLID Principles are only applicable to .NET/C# and not for Java. As an Architect, do I really need to care about S.O.L.I.D?. I am working in maintenance project, why do…

August 7, 2015 | by