
Use the Namespace Alias for Better Readability
Some .NET namespaces are unavoidably long, especially around COM interop and older libraries. C# lets you alias them at the top of a file so the rest of your code

Some .NET namespaces are unavoidably long, especially around COM interop and older libraries. C# lets you alias them at the top of a file so the rest of your code

We use a lot of ng-templates in our HTML and have cases where we would need to swap one with another based on a condition. ngSwitch comes handy in this

Learn how to use an extension method to update all of the items in a list with C#. public static IEnumerable ForEach(this IEnumerable collection, Action action){ //Loop thru the collection

You can use the yield keyword to hold and return the data to the caller. See below for an example. Public static IEnumerable ExampleMethod(){ List li = new List(); foreach

With the Skip and Take methods in LINQ, paging has become a lot easier. All we need to do is have a simple logic such as is outlined below. This

Tessaract is a popular OCR software that lets you convert image to text with high accuracy. We can utilize its SDK in .Net and convert image to text very easily.

Using the OrderBy operator in conjunction with Take in C#, we can pick a selected number of items based on an order. int n = 3;var firstThreeStates = states.OrderBy(s =

Using the Take operator, we can pick the first few elements of an array with a simple statement like this: int n = 3;var firstThreeStates = states.Take(n);

Using the transition property on an element, we can do amazing CSS transitions. See below for a example. The div will change color on hover with a transition. HTML: Hover