C# Tip: use yield return to return one item at the time 2021-12-14 4 min read CSharp Tips Yield is a keyword that allows you to return an item at the time instead of creating a full list and returning it as a whole. Continue reading
C# Tip: Use a SortedSet to avoid duplicates and sort items 2021-11-16 3 min read CSharp Tips Using the right data structure is crucial to building robust and efficient applications. So, why use a List or a HashSet to sort items (and remove duplicates) when you have a SortedSet? Continue reading
C# Tip: use the Ping class instead of an HttpClient to ping an endpoint 2021-10-19 2 min read CSharp Tips Sometimes you need to ping some endpoints. Don’t rely on HttpClient, but use the native Ping class. Continue reading
C# tip: define Using Aliases to avoid ambiguity 2021-09-21 3 min read CSharp Tips Sometimes we need to use objects with the same name but from different namespaces. How to remove that ambiguity? By Using Aliases! Continue reading
C# tip: create correct DateTimes with DateTimeKind 2021-08-07 2 min read CSharp Tips Creating simple DateTimes creates issues when handling timezones. You can solve some issues by using DateTimeKind Continue reading
C# tip: String.IsNullOrEmpty or String.IsNullOrWhiteSpace? 2021-07-06 2 min read CSharp Tips Is your string really empty, or has it hidden characters? With String.IsNullOrEmpty and String.IsNullOrWhiteSpace you can find it Continue reading
C# tip: how to get the index of an item in a foreach loop 2021-06-08 4 min read CSharp Tips Do you need the index of the current item in a foreach loop with C#? Here you’ll see two approaches. Continue reading