.net48

Collection initializer: List<T> Read in English

We're all used to write new List<int> { 1, 2, 3, 4 } or new int[] { 1, 2, 3, 4} to initialize collections with values. Syntactically, they look similar, but the behavior is different, and you should be careful if you are worried about performance.

Read more...

String of Digits Read in English

A popular task is to check if a string contains only digits. For example, you need to check if the user entered the correct phone number, index or a tax code of an organization. There are several ways to solve this task, which differ in their efficiency. Let's take a look at the most popular ones.

Read more...

Any() vs Count: part 2 Read in English

In Part 1, we compared Any() and Count methods for different collections and proposed optimization approaches.

Read more...