Here is a quick C# tip of counting up values of a Dictionary<TKey, TValue> where the values contains a List<T> using Linq. Lets say you have a Dictionary that contains Dictionary<string, List<Guid>> and you wish to find out how many items of Guid you have. You can easily do it by the Sum Linq aggregate […]

Here is a quick C# tip, when using string compare don’t use
use the Equals and StringComparison.InvariantCultureIgnoreCase enum.
The thing you need to note is which rules are appropriate current culture, the invariant culture, ordinal or another culture entirely. One can create the compare from StringComparer.Create(culture, true)

In C# there is a params keyword which allows a method parameter to take variable number of arguments. MSDN Some notes on param It must always be the last parameter in the function/method definition There can only be one params keyword in a function/method parameter signature Example:
But by changing it to params we […]

In C# there is the out parameter keyword which causes arguments to be passed by reference. It is like the ref keyword, except that ref requires that the variable be initialized before it is passed. Example:
The out parameter keyword provides a way for a method to output multiple values from a method without […]

In C# when using the ref keyword it causes an argument to be passed by reference, not by value. In order to use a ref as a parameter, both the method definition and the calling method must explicitly use the ref keyword, and also the variable must be initialized before passing in. In the example […]

.NET provides in its System.IO namespace the Path class which performs operations on String instances that contain file or directory path information. These operations are performed in a cross-platform manner. Most of the time we see develeopers writing code like
But by using Path.Combine we can provide a cross platform path
By using […]