Volodymyr Gaevoy's blog | Expert Web Development Services Get simple and helpful tips on .NET, c#, web programming and professional software development on Volodymyr Gaevoy's blog https://gaevoy.com/ Using C# 12 Features in .NET Framework Ah, .NET Framework - our trusty old friend that refuses to retire! While it might be considered legacy, there are still tons of .NET Framework projects out there in the wild. And let’s be honest, moving to the latest .NET isn’t always a walk in the park, especially when your... Tue, 22 Oct 2024 00:00:00 +0000 https://gaevoy.com/2024/10/22/using-csharp-12-in-dotnet-framework-guide.html https://gaevoy.com/2024/10/22/using-csharp-12-in-dotnet-framework-guide.html Exception Rethrow traps in .NET Framework In my investigation of a production issue in a .NET Framework application, I faced a challenge while trying to match the stack trace from error logs to the source code. Despite .NET documentation stating to keep the original stack trace information with the exception, use the throw statement without specifying... Mon, 29 Jan 2024 00:00:00 +0000 https://gaevoy.com/2024/01/29/exception-rethrow-dotnet-framework-traps.html https://gaevoy.com/2024/01/29/exception-rethrow-dotnet-framework-traps.html Learn C# Enum Flags by Doing Ever tried naming your favorite things using enums in C#/.NET, like choosing between Dog, Cat, or Bird for your favorite pet, or picking your top language from English, German, Ukrainian? Enums are fantastic for this - like a personal pick-n-mix of named values. But here’s the twist: what if you’re... Tue, 14 Nov 2023 00:00:00 +0000 https://gaevoy.com/2023/11/14/learn-enum-flags-csharp.html https://gaevoy.com/2023/11/14/learn-enum-flags-csharp.html Handling of unknown enums in .NET serialization for API integration Enumerations, or Enums, serve as a comprehensive method for representing named values, such as currencies (e.g., EUR, USD, NOK) and languages (e.g., English, German, Spanish). They are integral to the vast majority of programming languages. Additionally, OpenAPI (Swagger) accommodates Enums through its utilization of JSON, a subset of JavaScript. However,... Tue, 26 Sep 2023 00:00:00 +0000 https://gaevoy.com/2023/09/26/dotnet-serialization-unknown-enums-handling-api.html https://gaevoy.com/2023/09/26/dotnet-serialization-unknown-enums-handling-api.html Speed up NUnit tests in one-line Nowadays, software developers use laptops with lots of CPU cores. The same on server frames - the number of CPUs grows. As a developer, I expect that the libraries I use are optimized to distribute workload across multiple CPU cores by default. But it is not the case for NUnit... Wed, 19 Jul 2023 00:00:00 +0000 https://gaevoy.com/2023/07/19/speed-up-nunit-tests.html https://gaevoy.com/2023/07/19/speed-up-nunit-tests.html Compute SHA hash for streams We have a generic logic to log all requests towards API. Due to security reasons, we cannot log the request body because it can contain sensitive data or personal identifiable information (PII) such as customer emails, names, passwords, etc. To distinguish requests, we have decided to hash a request body... Tue, 11 Jul 2023 00:00:00 +0000 https://gaevoy.com/2023/07/11/compute-sha-for-streams.html https://gaevoy.com/2023/07/11/compute-sha-for-streams.html Beware of decimals in Microsoft SQL Server Every year, we adjust prices for services according to the inflation rate and some business requirements. This year we have got new requirements to increase and round the prices according to specific business rules. We use Microsoft SQL Server and the prices are stored there. To update prices we should... Fri, 17 Feb 2023 00:00:00 +0000 https://gaevoy.com/2023/02/17/beware-of-decimals-in-t-sql.html https://gaevoy.com/2023/02/17/beware-of-decimals-in-t-sql.html Review .NET dependencies on every commit I want to share with you a sad story that would not have happened if I had known earlier how to review .NET dependencies automatically. I work with .NET app that has a lot of .NET Framework projects. However, they are slowly being migrated to .NET Standard to be able... Thu, 19 May 2022 00:00:00 +0000 https://gaevoy.com/2022/05/19/review-dependencies-on-every-commit.html https://gaevoy.com/2022/05/19/review-dependencies-on-every-commit.html .NET type for personally identifiable information (PII) At some point, I started to feel discomfort working with personally identifiable information data in our project. Mostly, because it is a relatively new field and not always straightforward. In this article, I’m going to try to tackle the main issues and make the implicit explicit. Personally identifiable information (PII)... Fri, 18 Mar 2022 00:00:00 +0000 https://gaevoy.com/2022/03/18/personally-identifiable-information-data-types.html https://gaevoy.com/2022/03/18/personally-identifiable-information-data-types.html Duty bot via Google Sheets Who’s on duty today? Yeah, it always takes me to school time. However, this keeps sounding over and over again during software development. Because, our team has a support duty to quickly respond to technical questions by the support team, follow logs, and system health. Usually, it is a boring... Tue, 14 Dec 2021 00:00:00 +0000 https://gaevoy.com/2021/12/14/duty-bot-via-google-sheets.html https://gaevoy.com/2021/12/14/duty-bot-via-google-sheets.html