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’.
Tag Archives: extension methods
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