Using the right data structure is crucial to build robust and efficient applications. So, why using an List or an HashSet to sort items (and remove duplicates) when you have a SortedSet?
Sometimes you need to ping some endpoints. Don't rely on HttpClient, but use the native Ping class.
Sometimes we need to use objects with the same name but from different namespaces. How to remove that ambiguity? By Using Aliases!
Creating simple DateTimes creates issues when handling timezones. You can solve some issues by using DateTimeKind
Is your string really empty, or has it hidden characters? With String.IsNullOrEmpty and String.IsNullOrWhiteSpace you can find it
Do you need the index of the current item in a foreach loop with C#? Here you'll see two approaches.