C# – LINQ Skip Example

Skip is LINQ functionality to filter collection by omitting given number of first elements. Below is an example how to use it. Let’s create a simple collection of strings: var animals = new List<string>() { “dog”, “cat”, “lion”, “duck”, “fish” }; 1 var animals = new List<string>() { “dog”, “cat”, “lion”, “duck”, “fish” }; Now … Continue reading C# – LINQ Skip Example

C# – Custom method of sorting strings

In this article you can find how to create custom method of sorting strings in C#. For the beginning let’s create an example list of strings, which are compass directions in random order. var directions = new List<string>() { “South East”, “North West”, “East”, “South West”, “North”, “West”, “North East”, “South” }; 1 2 3 … Continue reading C# – Custom method of sorting strings