<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>CSharp on Code4IT</title>
    <link>https://www.code4it.dev/tags/csharp/</link>
    <description>Recent content in CSharp on Code4IT</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Tue, 29 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.code4it.dev/tags/csharp/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Microsoft Agent Framework for .NET (part 4): static methods, instance methods, MCP Clients as custom Agent tools</title>
      <link>https://www.code4it.dev/blog/maf-custom-tools-csharp-methods-or-mcp-clients/</link>
      <pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/maf-custom-tools-csharp-methods-or-mcp-clients/</guid>
      <description>MAF Agents can have custom capabilities through C# methods or MCP clients. Let&amp;rsquo;s see how to define and use them.</description>
    </item>
    
    <item>
      <title>Testing beyond your imagination: Property-based testing in C# with FsCheck</title>
      <link>https://www.code4it.dev/blog/property-based-testing-fscheck/</link>
      <pubDate>Tue, 15 Sep 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/property-based-testing-fscheck/</guid>
      <description>Property-based testing is a powerful alternative to example-based testing. Instead of defining specific inputs and verifying their outcomes, you define properties that should always hold true. Let&amp;rsquo;s learn how to use FsCheck to write property-based tests in C# with NUnit.</description>
    </item>
    
    <item>
      <title>Microsoft Agent Framework for .NET (part 2): How to use IChatClient with Azure Foundry and Ollama in .NET</title>
      <link>https://www.code4it.dev/blog/maf-ichatclient-azure-foundry-ollama/</link>
      <pubDate>Tue, 21 Jul 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/maf-ichatclient-azure-foundry-ollama/</guid>
      <description>IChatClient is the core of Microsoft Agent Framework. Let&amp;rsquo;s see how to configure it with Azure Foundry and Ollama.</description>
    </item>
    
    <item>
      <title>C# Tip: Use required members to prevent invalid object initialization (beware of SetsRequiredMembers attribute!)</title>
      <link>https://www.code4it.dev/csharptips/required-members-and-setrequiredmembers-attribute/</link>
      <pubDate>Tue, 14 Jul 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/required-members-and-setrequiredmembers-attribute/</guid>
      <description>Learn how to use &lt;code&gt;required&lt;/code&gt; members in C# to enforce complete object initialization at compile time and avoid half-configured models. And beware of the &lt;code&gt;SetsRequiredMembers&lt;/code&gt; attribute, which can be dangerous if misused.</description>
    </item>
    
    <item>
      <title>No more regressions with Snapshot Tests in C# using Verify: a practical guide</title>
      <link>https://www.code4it.dev/blog/snapshot-tests-with-verify/</link>
      <pubDate>Tue, 30 Jun 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/snapshot-tests-with-verify/</guid>
      <description>Snapshot Tests are an uncommon type of test that focuses on checking that no regressions were introduced after a code refactoring. Let&amp;rsquo;s learn how they work and how to use the Verify NuGet library to add them to your test suite.</description>
    </item>
    
    <item>
      <title>Python for .NET devs: data types, classes, objects, records and interfaces</title>
      <link>https://www.code4it.dev/python-for-dotnet-developers/data-types-classes-objects-records-interfaces/</link>
      <pubDate>Tue, 26 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/python-for-dotnet-developers/data-types-classes-objects-records-interfaces/</guid>
      <description>A quick comparison of data types, classes, objects, records, and interfaces in C# and Python, designed for .NET developers learning Python.</description>
    </item>
    
    <item>
      <title>C# Tip: How to JSON Serialize and Deserialize values as DateTime, DateTimeOffset, DateOnly and TimeOnly</title>
      <link>https://www.code4it.dev/csharptips/json-serialize-deserialize-dates/</link>
      <pubDate>Tue, 24 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/json-serialize-deserialize-dates/</guid>
      <description>Handling dates is never trivial. And handling JSON serialization and deserialization of dates is even more difficult. And, even worse, how can you convert a value as DateTime, DateTimeOffset, DateOnly and TimeOnly?</description>
    </item>
    
    <item>
      <title>Readonly vs Immutable vs Frozen in C#: differences and (a lot of) benchmarks</title>
      <link>https://www.code4it.dev/blog/readonly-vs-immutable-vs-frozen/</link>
      <pubDate>Tue, 17 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/readonly-vs-immutable-vs-frozen/</guid>
      <description>The words ReadOnly, Immutable, Frozen seem similar but have distinct meanings in .NET. Here&amp;rsquo;s a detailed comparison of Readonly, Immutable, and Frozen collections in C#, with benchmarks and typical use cases.</description>
    </item>
    
    <item>
      <title>Code opinion: why I prefer avoiding the Async suffix in C# asynchronous methods</title>
      <link>https://www.code4it.dev/blog/code-opinion-async-suffix/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/code-opinion-async-suffix/</guid>
      <description>Should every asynchronous method name end with Async? Does it bring more benefits or more downsides? Let&amp;rsquo;s reason about this habit, which is common among C# developers.</description>
    </item>
    
    <item>
      <title>[C# Tip] How to create and access custom C# Attributes by using Reflection</title>
      <link>https://www.code4it.dev/csharptips/custom-csharp-attributes-reflection/</link>
      <pubDate>Tue, 16 Dec 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/custom-csharp-attributes-reflection/</guid>
      <description>In C#, Attributes are a handy mechanism to attach metadata to your classes, methods, properties, etc. In this article, we will see how to create custom Attributes and access them at runtime using Reflection.</description>
    </item>
    
    <item>
      <title>Introducing the Testing Vial: a (better?) alternative to Testing Diamond and Testing Pyramid</title>
      <link>https://www.code4it.dev/blog/testing-vial/</link>
      <pubDate>Sun, 12 Oct 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/testing-vial/</guid>
      <description>The Testing Pyramid focuses on Unit Tests; the Testing Diamond focuses on Integration Tests; and what about the Testing Vial?</description>
    </item>
    
    <item>
      <title>C# Tip: injecting and testing the current time with TimeProvider and FakeTimeProvider</title>
      <link>https://www.code4it.dev/csharptips/timeprovider-faketimeprovider/</link>
      <pubDate>Tue, 02 Sep 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/timeprovider-faketimeprovider/</guid>
      <description>Dates used to be difficult to test. But with TimeProvider and FakeTimeProvider, everything becomes possible!</description>
    </item>
    
    <item>
      <title>Build your own Static Code Analysis tool in .NET by knowing how Assembly, Type, MethodInfo, ParameterInfo work.</title>
      <link>https://www.code4it.dev/blog/assembly-type-methodinfo-parameterinfo/</link>
      <pubDate>Tue, 29 Jul 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/assembly-type-methodinfo-parameterinfo/</guid>
      <description>Why buy a whole tool when you can build your own? Learn how the Type system works in .NET, and create your own minimal type analyser.</description>
    </item>
    
    <item>
      <title>C# Tip: Handling exceptions with Task.WaitAll and Task.WhenAll</title>
      <link>https://www.code4it.dev/csharptips/task-whenall-vs-task-waitall-error-handling/</link>
      <pubDate>Tue, 10 Jun 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/task-whenall-vs-task-waitall-error-handling/</guid>
      <description>Task.WhenAll and Task.WaitAll are common methods in C# that allow you to execute multiple Tasks. But&amp;hellip; what happens when an exception is thrown?</description>
    </item>
    
    <item>
      <title>How to run SonarQube analysis locally with Docker</title>
      <link>https://www.code4it.dev/blog/sonarqube-local-with-docker/</link>
      <pubDate>Tue, 27 May 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/sonarqube-local-with-docker/</guid>
      <description>The quality of a project can be measured by having a look at how the code is written. SonarQube can help you by running static code analysis and letting you spot the pain points. Let&amp;rsquo;s learn how to install and run it locally with Docker.</description>
    </item>
    
    <item>
      <title>C# Tip: An In-Depth Look at CallerMemberName (and some Compile-Time trivia)</title>
      <link>https://www.code4it.dev/csharptips/callermembername-attribute/</link>
      <pubDate>Tue, 25 Mar 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/callermembername-attribute/</guid>
      <description>Let&amp;rsquo;s dive deep into the CallerMemberName attribute and explore its usage from multiple angles. We&amp;rsquo;ll see various methods of invoking it, shedding light on how it is defined at compile time.</description>
    </item>
    
    <item>
      <title>How to log to Azure Application Insights using ILogger in ASP.NET Core</title>
      <link>https://www.code4it.dev/blog/azure-application-insights-ilogger-aspnetcore/</link>
      <pubDate>Tue, 18 Mar 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/azure-application-insights-ilogger-aspnetcore/</guid>
      <description>Application Insights is a great tool for handling high volumes of logs. How can you configure an ASP.NET application to send logs to Azure Application Insights? What can I do to have Application Insights log my exceptions?</description>
    </item>
    
    <item>
      <title>C# Tip: How to create Custom Attributes, and why they are useful</title>
      <link>https://www.code4it.dev/csharptips/create-custom-csharp-attributes/</link>
      <pubDate>Tue, 21 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/create-custom-csharp-attributes/</guid>
      <description>Applying custom attributes to C# classes and interfaces can be useful for several reasons. Let&amp;rsquo;s learn how to create Custom Attributes in C#, and let&amp;rsquo;s explore some practical usage!</description>
    </item>
    
    <item>
      <title>HTTP Logging in ASP.NET: how to automatically log all incoming HTTP requests (and its downsides!)</title>
      <link>https://www.code4it.dev/blog/httplogging-asp-net/</link>
      <pubDate>Tue, 14 Jan 2025 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/httplogging-asp-net/</guid>
      <description>Aren&amp;rsquo;t you tired of adding manual logs to your HTTP APIs to log HTTP requests and responses? By using a built-in middleware in ASP.NET, you will be able to centralize logs management and have a clear view of all the incoming HTTP requests.</description>
    </item>
    
    <item>
      <title>C# Tip: 2 ways to generate realistic data using Bogus</title>
      <link>https://www.code4it.dev/csharptips/bogus-data-generation/</link>
      <pubDate>Tue, 03 Dec 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/bogus-data-generation/</guid>
      <description>Bogus is a library that generates realistic values for your data. When populating fake user names, instead of Foo and Bar, you can have John and Sarah. Let&amp;rsquo;s see two ways to define and reuse a Faker definition.</description>
    </item>
    
    <item>
      <title>Easy logging management with Seq and ILogger in ASP.NET</title>
      <link>https://www.code4it.dev/blog/logging-with-ilogger-and-seq/</link>
      <pubDate>Tue, 19 Nov 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/logging-with-ilogger-and-seq/</guid>
      <description>Seq is one of the best Log Sinks out there : it&amp;rsquo;s easy to install and configure, and can be added to an ASP.NET application with just a line of code.</description>
    </item>
    
    <item>
      <title>C# Tip: IEnumerable vs ICollection, and why it matters</title>
      <link>https://www.code4it.dev/csharptips/ienumerable-vs-icollection/</link>
      <pubDate>Tue, 15 Oct 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/ienumerable-vs-icollection/</guid>
      <description>When working with Lists in C#, you are working on a data structure that implements both ICollection and IEnumerable. What&amp;rsquo;s the difference between ICollection and IEnumerable? Why should you care about them, especially when exposing functionalities to external clients?</description>
    </item>
    
    <item>
      <title>How to use IHttpClientFactory and WireMock.NET together using Moq</title>
      <link>https://www.code4it.dev/blog/wiremock-ihttpclientfactory-moq/</link>
      <pubDate>Tue, 01 Oct 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/wiremock-ihttpclientfactory-moq/</guid>
      <description>WireMock.NET is a popular library used to simulate network communication through HTTP. But there is no simple way to integrate the generated in-memory server with an instance of IHttpClientFactory injected via constructor. Right? Wrong!</description>
    </item>
    
    <item>
      <title>C# Tip: 2 ways to use custom equality rules in a HashSet</title>
      <link>https://www.code4it.dev/csharptips/hashset-custom-equality/</link>
      <pubDate>Tue, 27 Aug 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/hashset-custom-equality/</guid>
      <description>With HashSet, you can get a list of different items in a performant way. What if you need a custom way to define when two objects are equal?</description>
    </item>
    
    <item>
      <title>C# Tip: Mark a class as Sealed to prevent subclasses creation</title>
      <link>https://www.code4it.dev/csharptips/sealed-classes/</link>
      <pubDate>Tue, 16 Jul 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/sealed-classes/</guid>
      <description>The sealed keyword is often ignored, yet it can be important to define a proper class design.</description>
    </item>
    
    <item>
      <title>Seeding in-memory Entity Framework with realistic data with Bogus</title>
      <link>https://www.code4it.dev/blog/seed-inmemory-entityframework-bogus/</link>
      <pubDate>Tue, 09 Jul 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/seed-inmemory-entityframework-bogus/</guid>
      <description>You don&amp;rsquo;t need a physical database to experiment with ORMs. You can use an in-memory DB and seed the database with realistic data generated with Bogus.</description>
    </item>
    
    <item>
      <title>C# Tip: Path.Combine and Path.Join are similar but way different.</title>
      <link>https://www.code4it.dev/csharptips/path-combine-vs-path-join/</link>
      <pubDate>Tue, 25 Jun 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/path-combine-vs-path-join/</guid>
      <description>When composing the path to a folder or file location, the &lt;code&gt;Path&lt;/code&gt; class can come in handy. &lt;code&gt;Path.Join&lt;/code&gt; and &lt;code&gt;Path.Combine&lt;/code&gt; may look similar, but their behavior differ in an unexpected way.</description>
    </item>
    
    <item>
      <title>Why reaching 100% Code Coverage must NOT be your testing goal (with examples in C#)</title>
      <link>https://www.code4it.dev/blog/code-coverage-must-not-be-the-target/</link>
      <pubDate>Tue, 12 Mar 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/code-coverage-must-not-be-the-target/</guid>
      <description>Average teams aim at 100% Code Coverage just to reach the number. Great teams don&amp;rsquo;t. Why?</description>
    </item>
    
    <item>
      <title>C# Tip: IFormattable interface, to define different string formats for the same object</title>
      <link>https://www.code4it.dev/csharptips/iformattable-interface/</link>
      <pubDate>Tue, 27 Feb 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/iformattable-interface/</guid>
      <description>Same object, different string representations. How do we achieve it in a standardised way?</description>
    </item>
    
    <item>
      <title>Is Random.GetItems the best way to get random items in C# 12?</title>
      <link>https://www.code4it.dev/blog/how-to-get-random-items/</link>
      <pubDate>Tue, 13 Feb 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/how-to-get-random-items/</guid>
      <description>You have a collection of items. You want to retrieve N elements randomly. Which alternatives do we have?</description>
    </item>
    
    <item>
      <title>C# Tip: ObservableCollection - a data type to intercept changes to the collection</title>
      <link>https://www.code4it.dev/csharptips/observablecollection/</link>
      <pubDate>Tue, 23 Jan 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/observablecollection/</guid>
      <description>&lt;code&gt;ObservableCollection&amp;lt;T&amp;gt;&lt;/code&gt; is a data type that allows you to react when an item is added or removed from the collection. Let&amp;rsquo;s learn more!</description>
    </item>
    
    <item>
      <title>Top 6 Performance Tips when dealing with strings in C# 12 and .NET 8</title>
      <link>https://www.code4it.dev/blog/top-6-string-performance-tips/</link>
      <pubDate>Tue, 19 Dec 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/top-6-string-performance-tips/</guid>
      <description>Small changes sometimes make a huge difference. Learn these 6 tips to improve the performance of your application just by handling strings correctly.</description>
    </item>
    
    <item>
      <title>4 ways to create Unit Tests without Interfaces in C#</title>
      <link>https://www.code4it.dev/blog/unit-tests-without-interfaces/</link>
      <pubDate>Tue, 12 Dec 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/unit-tests-without-interfaces/</guid>
      <description>C# devs have the bad habit of creating interfaces for every non-DTO class because «we need them for mocking!». Are you sure it&amp;rsquo;s the only way?</description>
    </item>
    
    <item>
      <title>C# Tip: Use TestCase to run similar unit tests with NUnit</title>
      <link>https://www.code4it.dev/csharptips/nunit-testcase/</link>
      <pubDate>Tue, 28 Nov 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/nunit-testcase/</guid>
      <description>Learn how to organize similar unit tests using the &lt;code&gt;TestCase&lt;/code&gt; attribute in NUnit!</description>
    </item>
    
    <item>
      <title>[ENG] .NET 5, 6, 7, and 8 for busy developers | .NET Community Austria</title>
      <link>https://www.code4it.dev/video/dotnet5-6-7-8-dotnet-austria/</link>
      <pubDate>Tue, 21 Nov 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/video/dotnet5-6-7-8-dotnet-austria/</guid>
      <description></description>
    </item>
    
    <item>
      <title>How to extract, create, and navigate Zip Files in C#</title>
      <link>https://www.code4it.dev/blog/working-with-zip-files/</link>
      <pubDate>Tue, 14 Nov 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/working-with-zip-files/</guid>
      <description>Learn how to zip and unzip compressed files with C#. Beware: it&amp;rsquo;s not as obvious as it might seem!</description>
    </item>
    
    <item>
      <title>C# Tip: How to create Unit Tests for Model Validation</title>
      <link>https://www.code4it.dev/csharptips/unit-test-model-validation/</link>
      <pubDate>Tue, 24 Oct 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/unit-test-model-validation/</guid>
      <description>As you know, you should always validate input models. Therefore, you should create Unit Tests to test the data validation. Let&amp;rsquo;s learn!</description>
    </item>
    
    <item>
      <title>C# Tip: Improve memory allocation by initializing collection size</title>
      <link>https://www.code4it.dev/csharptips/initialize-collection-size/</link>
      <pubDate>Tue, 26 Sep 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/initialize-collection-size/</guid>
      <description>Sometimes just a minor change can affect performance. Here&amp;rsquo;s a simple trick: initialize your collections by specifying the initial size!</description>
    </item>
    
    <item>
      <title>Advanced Integration Tests for .NET 7 API with WebApplicationFactory and NUnit</title>
      <link>https://www.code4it.dev/blog/advanced-integration-tests-webapplicationfactory/</link>
      <pubDate>Tue, 01 Aug 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/advanced-integration-tests-webapplicationfactory/</guid>
      <description>Integration Tests are incredibly useful: a few Integration Tests are often more useful than lots of Unit Tests. Let&amp;rsquo;s learn some advanced capabilities of &lt;code&gt;WebApplicationFactory&lt;/code&gt;.</description>
    </item>
    
    <item>
      <title>C# Tip: 2 ways to define ASP.NET Core custom Middleware</title>
      <link>https://www.code4it.dev/csharptips/custom-middleware/</link>
      <pubDate>Tue, 11 Jul 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/custom-middleware/</guid>
      <description>Customizing the behavior of an HTTP request is easy: you can use a middleware defined as a delegate or as a class.</description>
    </item>
    
    <item>
      <title>How to automatically refresh configurations with Azure App Configuration in ASP.NET Core</title>
      <link>https://www.code4it.dev/blog/azure-app-configuration-refresh-config/</link>
      <pubDate>Tue, 04 Jul 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/azure-app-configuration-refresh-config/</guid>
      <description>ASP.NET allows you to poll Azure App Configuration to always get the most updated values without restarting your applications. It&amp;rsquo;s simple, but you have to think thoroughly.</description>
    </item>
    
    <item>
      <title>[ENG] .NET 5, 6, and 7 for busy developers | Dotnet Sheff</title>
      <link>https://www.code4it.dev/video/dotnet5-6-7-dotnet-sheff/</link>
      <pubDate>Wed, 21 Jun 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/video/dotnet5-6-7-dotnet-sheff/</guid>
      <description></description>
    </item>
    
    <item>
      <title>Azure App Configuration and .NET API: a smart and secure way to manage configurations</title>
      <link>https://www.code4it.dev/blog/azure-app-configuration-dotnet-api/</link>
      <pubDate>Tue, 20 Jun 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/azure-app-configuration-dotnet-api/</guid>
      <description>Centralizing configurations can be useful for several reasons: security, consistency, deployability. In this article, we&amp;rsquo;re gonna use Azure App Configuration to centralize the configurations used in a .NET API application.</description>
    </item>
    
    <item>
      <title>C# Tip: Use custom Equality comparers in Nunit tests</title>
      <link>https://www.code4it.dev/csharptips/nunit-equals-custom-comparer/</link>
      <pubDate>Tue, 13 Jun 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/nunit-equals-custom-comparer/</guid>
      <description>When writing unit tests, there are smarter ways to check if two objects are equal than just comparing every field one by one.</description>
    </item>
    
    <item>
      <title>How to add Dependency Injection, Configurations, and Logging in a .NET 7 Console Application</title>
      <link>https://www.code4it.dev/blog/dependency-injection-config-logging-in-console-application/</link>
      <pubDate>Tue, 06 Jun 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/dependency-injection-config-logging-in-console-application/</guid>
      <description>By default, you cannot use Dependency Injection, custom logging, and configurations from settings in a Console Application. Unless you create a custom &lt;code&gt;Host&lt;/code&gt;!</description>
    </item>
    
    <item>
      <title>Understanding IOptions, IOptionsMonitor, and IOptionsSnapshot in .NET 7</title>
      <link>https://www.code4it.dev/blog/ioptions-ioptionsmonitor-ioptionssnapshot/</link>
      <pubDate>Tue, 23 May 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/ioptions-ioptionsmonitor-ioptionssnapshot/</guid>
      <description>There are several ways to handle configurations in a .NET Application. In this article, we&amp;rsquo;re going to learn how to use &lt;code&gt;IOptions&amp;lt;T&amp;gt;&lt;/code&gt;, &lt;code&gt;IOptionsSnapshot&amp;lt;T&amp;gt;&lt;/code&gt;, and &lt;code&gt;IOptionsMonitor&amp;lt;T&amp;gt;&lt;/code&gt;</description>
    </item>
    
    <item>
      <title>C# Tip: Advanced Switch Expressions and Switch Statements using filters</title>
      <link>https://www.code4it.dev/csharptips/switch-expressions-and-statements/</link>
      <pubDate>Tue, 16 May 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/switch-expressions-and-statements/</guid>
      <description>We all use &lt;code&gt;switch&lt;/code&gt; statements in our code. Do you use them at their full potential?</description>
    </item>
    
    <item>
      <title>How to download an online file and store it on file system with C#</title>
      <link>https://www.code4it.dev/blog/download-and-save-files/</link>
      <pubDate>Tue, 09 May 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/download-and-save-files/</guid>
      <description>Downloading a file from a remote resource seems an easy task: download the byte stream and copy it to a local file. Beware of edge cases!</description>
    </item>
    
    <item>
      <title>C# Tip: Format Interpolated Strings</title>
      <link>https://www.code4it.dev/csharptips/format-interpolated-strings/</link>
      <pubDate>Tue, 02 May 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/format-interpolated-strings/</guid>
      <description>Interpolated strings are those built with the &lt;code&gt;$&lt;/code&gt; symbol, that you can use to create strings using existing variables or properties. Did you know that you can apply custom formattings to such values?</description>
    </item>
    
    <item>
      <title>C# Tip: Access items from the end of the array using the ^ operator</title>
      <link>https://www.code4it.dev/csharptips/access-items-from-end-of-array/</link>
      <pubDate>Tue, 11 Apr 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/access-items-from-end-of-array/</guid>
      <description>Shorter code is often easier to read. Not always, but often. And the &lt;code&gt;^&lt;/code&gt; operator can make your code easier to read and less error-prone</description>
    </item>
    
    <item>
      <title>C# Tip: Initialize lists size to improve performance</title>
      <link>https://www.code4it.dev/csharptips/initialize-lists-size/</link>
      <pubDate>Tue, 28 Feb 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/initialize-lists-size/</guid>
      <description>Lists have an inner capacity. Every time you add more items than the current Capacity, you add performance overhead. How to prevent it?</description>
    </item>
    
    <item>
      <title>C# Tip: List Pattern to match an collection against a sequence of patterns</title>
      <link>https://www.code4it.dev/csharptips/list-pattern/</link>
      <pubDate>Tue, 14 Feb 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/list-pattern/</guid>
      <description>By using list patterns on an array or a list you can check whether a it contains the values you expect in a specific position.</description>
    </item>
    
    <item>
      <title>C# Tip: do NOT use nameof to give constants a value</title>
      <link>https://www.code4it.dev/csharptips/do-not-use-nameof-for-constants/</link>
      <pubDate>Tue, 31 Jan 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/do-not-use-nameof-for-constants/</guid>
      <description>In C#, nameof can be quite useful. But it has some drawbacks, if used the wrong way.</description>
    </item>
    
    <item>
      <title>C# Tip: LINQ&#39;s Enumerable.Range to generate a sequence of consecutive numbers</title>
      <link>https://www.code4it.dev/csharptips/enumerable-range/</link>
      <pubDate>Tue, 17 Jan 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/enumerable-range/</guid>
      <description>If you need a sequence of numbers, you can pick two ways: use a While loop, or use Enumerable.Range</description>
    </item>
    
    <item>
      <title>LINQ for beginners: pick the right methods!</title>
      <link>https://www.code4it.dev/blog/linq-differences/</link>
      <pubDate>Tue, 10 Jan 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/linq-differences/</guid>
      <description>LINQ is a set of methods that help developers perform operations on sets of items. There are tons of methods - do you know which is the one for you?</description>
    </item>
    
    <item>
      <title>C# Tip: Raise synchronous events using Timer (and not a While loop)</title>
      <link>https://www.code4it.dev/csharptips/timer-to-trigger-synchronous-events/</link>
      <pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/timer-to-trigger-synchronous-events/</guid>
      <description>When you need to fire synchronous events, don&amp;rsquo;t use a while(true) loop: use a Timer!</description>
    </item>
    
    <item>
      <title>C# Tip: use the @ prefix when a name is reserved</title>
      <link>https://www.code4it.dev/csharptips/use-at-symbol-prefix/</link>
      <pubDate>Tue, 25 Oct 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/use-at-symbol-prefix/</guid>
      <description>C#, as every other language, has several reserved keywords. Did you know that you can use them if you use the &lt;code&gt;@&lt;/code&gt; prefix?</description>
    </item>
    
    <item>
      <title>3 (and more) ways to set configuration values in .NET</title>
      <link>https://www.code4it.dev/blog/how-to-set-configurations-values-dotnet/</link>
      <pubDate>Tue, 18 Oct 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/how-to-set-configurations-values-dotnet/</guid>
      <description>Every application relies on some configurations. Many devs set them up using only the appsettings file. But there&amp;rsquo;s more!</description>
    </item>
    
    <item>
      <title>How to log Correlation IDs in .NET APIs with Serilog</title>
      <link>https://www.code4it.dev/blog/serilog-correlation-id/</link>
      <pubDate>Tue, 20 Sep 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/serilog-correlation-id/</guid>
      <description>APIs often call other APIs to perform operations. If an error occurs in one of them, how can you understand the context that caused that error? You can use Correlation IDs in your logs!</description>
    </item>
    
    <item>
      <title>C# Tip: use Miniprofiler instead of Stopwatch to profile code performance</title>
      <link>https://www.code4it.dev/csharptips/profile-code-with-miniprofiler/</link>
      <pubDate>Tue, 13 Sep 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/profile-code-with-miniprofiler/</guid>
      <description>Miniprofiler is a nice tool to profile your code in a smart way. Learn why it is better than Stopwatch to measure the execution time of your .NET code.</description>
    </item>
    
    <item>
      <title>How to propagate HTTP Headers (and  Correlation IDs) using HttpClients in C#</title>
      <link>https://www.code4it.dev/blog/propagate-httpheader-and-correlation-id/</link>
      <pubDate>Tue, 02 Aug 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/propagate-httpheader-and-correlation-id/</guid>
      <description>Propagating HTTP Headers can be useful, especially when dealing with Correlation IDs. It&amp;rsquo;s time to customize our HttpClients!</description>
    </item>
    
    <item>
      <title>5 tricks every C# dev should know about LINQPad</title>
      <link>https://www.code4it.dev/blog/5-linqpad-tricks/</link>
      <pubDate>Tue, 19 Jul 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/5-linqpad-tricks/</guid>
      <description>LINQPad is one of the tools I use daily. But still, I haven&amp;rsquo;t used it at its full power. And you?</description>
    </item>
    
    <item>
      <title>C# Tip: SelectMany in LINQ</title>
      <link>https://www.code4it.dev/csharptips/linq-selectmany/</link>
      <pubDate>Tue, 12 Jul 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/linq-selectmany/</guid>
      <description>SelectMany is one of the LINQ methods I&amp;rsquo;ve used the least. I couldn&amp;rsquo;t get it! Turns out it was actually incredibly simple.</description>
    </item>
    
    <item>
      <title>How to solve InvalidOperationException for constructors using HttpClientFactory in C#</title>
      <link>https://www.code4it.dev/blog/solve-constructor-exception-with-httpclientfactory/</link>
      <pubDate>Tue, 05 Jul 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/solve-constructor-exception-with-httpclientfactory/</guid>
      <description>A suitable constructor for type &amp;lsquo;X&amp;rsquo; could not be located. What a strange error message! Luckily it&amp;rsquo;s easy to solve.</description>
    </item>
    
    <item>
      <title>How to improve Serilog logging in .NET 6 by using Scopes</title>
      <link>https://www.code4it.dev/blog/serilog-logging-scope/</link>
      <pubDate>Tue, 21 Jun 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/serilog-logging-scope/</guid>
      <description>Logs are important. Properly structured logs can be the key to resolving some critical issues. With Serilog&amp;rsquo;s Scopes, you can enrich your logs with info about the context where they happened.</description>
    </item>
    
    <item>
      <title>C# Tip: use IHttpClientFactory to generate HttpClient instances</title>
      <link>https://www.code4it.dev/csharptips/use-httpclientfactory-instead-of-httpclient/</link>
      <pubDate>Tue, 07 Jun 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/use-httpclientfactory-instead-of-httpclient/</guid>
      <description>Initializing HttpClient instances can expose you to Socket Exhaustion problems. You should use IHttpClientFactory instead</description>
    </item>
    
    <item>
      <title>8 things about Records in C# you probably didn&#39;t know</title>
      <link>https://www.code4it.dev/blog/8-things-about-records-csharp/</link>
      <pubDate>Tue, 31 May 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/8-things-about-records-csharp/</guid>
      <description>C# recently introduced Records, a new way of defining types. In this article, we will see 8 things you probably didn&amp;rsquo;t know about C# Records</description>
    </item>
    
    <item>
      <title>3 ways to check the object passed to mocks with Moq in C#</title>
      <link>https://www.code4it.dev/blog/check-objects-called-mocks-in-moq/</link>
      <pubDate>Tue, 17 May 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/check-objects-called-mocks-in-moq/</guid>
      <description>In unit tests, sometimes you need to perform deep checks on the object passed to the mocked service. We will learn 3 ways to do that with Moq and C#</description>
    </item>
    
    <item>
      <title>C# Tip: Convert ExpandoObjects to IDictionary</title>
      <link>https://www.code4it.dev/csharptips/expandoobject-to-dictionary/</link>
      <pubDate>Tue, 10 May 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/expandoobject-to-dictionary/</guid>
      <description>How to get all the keys of an ExpandoObject? Convert it to Dictionary!</description>
    </item>
    
    <item>
      <title>How to access the HttpContext in .NET API</title>
      <link>https://www.code4it.dev/blog/inject-httpcontext/</link>
      <pubDate>Tue, 12 Apr 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/inject-httpcontext/</guid>
      <description>If your application is exposed on the Web, I guess that you get some values from the HTTP Requests, don&amp;rsquo;t you?</description>
    </item>
    
    <item>
      <title>C# Tip: Use Debug-Assert to break the debugging flow if a condition fails</title>
      <link>https://www.code4it.dev/csharptips/debug-assert/</link>
      <pubDate>Tue, 05 Apr 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/debug-assert/</guid>
      <description>It would be great if we could break the debugging flow if a condition is (not) met. Can we? Of course!</description>
    </item>
    
    <item>
      <title>How to perform CRUD operations with Entity Framework Core and PostgreSQL</title>
      <link>https://www.code4it.dev/blog/postgres-crud-entityframework/</link>
      <pubDate>Tue, 29 Mar 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/postgres-crud-entityframework/</guid>
      <description>With Entity Framework you can perform operations on relational databases without writing a single line of SQL. We will use EF to integrate PostgreSQL in our application</description>
    </item>
    
    <item>
      <title>Advanced parsing using Int.TryParse in C#</title>
      <link>https://www.code4it.dev/blog/advanced-int-tryparse/</link>
      <pubDate>Tue, 15 Mar 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/advanced-int-tryparse/</guid>
      <description>We all need to parse strings as integers. Most of the time, we use int.TryParse(string, out int). But there&amp;rsquo;s a more advanced overload that we can use for complex parsing.</description>
    </item>
    
    <item>
      <title>C# Tip: How to temporarily change the CurrentCulture</title>
      <link>https://www.code4it.dev/csharptips/change-current-culture-in-using-block/</link>
      <pubDate>Tue, 08 Mar 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/change-current-culture-in-using-block/</guid>
      <description>What can you do if you need to temporarily change the CurrentCulture in C#?</description>
    </item>
    
    <item>
      <title>PostgreSQL CRUD operations with C# and Dapper</title>
      <link>https://www.code4it.dev/blog/postgres-crud-dapper/</link>
      <pubDate>Tue, 01 Mar 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/postgres-crud-dapper/</guid>
      <description>Mapping every SQL result to a data type can be a pain. To simplify our life, we can use an ORM like Dapper to automatically map the data.</description>
    </item>
    
    <item>
      <title>C# Tip: Exception handling with WHEN clause</title>
      <link>https://www.code4it.dev/csharptips/exception-handling-when-clause/</link>
      <pubDate>Tue, 08 Feb 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/exception-handling-when-clause/</guid>
      <description>Instead of using if-else or switch blocks to handle exceptions, you can do it gracefully using the &amp;lsquo;when&amp;rsquo; keyword.</description>
    </item>
    
    <item>
      <title>CRUD operations on PostgreSQL using C# and Npgsql</title>
      <link>https://www.code4it.dev/blog/postgres-crud-operations-npgsql/</link>
      <pubDate>Tue, 01 Feb 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/postgres-crud-operations-npgsql/</guid>
      <description>Once we have a Postgres instance running, we can perform operations on it. We will use Npgsql to query a Postgres instance with C#</description>
    </item>
    
    <item>
      <title>C# Tip: use yield return to return one item at the time</title>
      <link>https://www.code4it.dev/csharptips/yield-return/</link>
      <pubDate>Tue, 14 Dec 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/yield-return/</guid>
      <description>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.</description>
    </item>
    
    <item>
      <title>Profiling .NET code with MiniProfiler</title>
      <link>https://www.code4it.dev/blog/miniprofiler/</link>
      <pubDate>Tue, 07 Dec 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/miniprofiler/</guid>
      <description>Is your application slow? How to find bottlenecks? If so, you can use MiniProfiler to profile a .NET API application and analyze the timings of the different operations.</description>
    </item>
    
    <item>
      <title>How to parse JSON Lines (JSONL) with C# </title>
      <link>https://www.code4it.dev/blog/parse-jsonlines/</link>
      <pubDate>Tue, 23 Nov 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/parse-jsonlines/</guid>
      <description>JSONL is JSON&amp;rsquo;s less famous sibling: it allows you to store JSON objects separating them with new line. We will learn how to parse a JSONL string with C#.</description>
    </item>
    
    <item>
      <title>C# Tip: Use a SortedSet to avoid duplicates and sort items</title>
      <link>https://www.code4it.dev/csharptips/sorted-set/</link>
      <pubDate>Tue, 16 Nov 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/sorted-set/</guid>
      <description>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?</description>
    </item>
    
    <item>
      <title>How to resolve dependencies in .NET APIs based on current HTTP Request</title>
      <link>https://www.code4it.dev/blog/resolving-dependencies-depending-on-httprequest/</link>
      <pubDate>Tue, 09 Nov 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/resolving-dependencies-depending-on-httprequest/</guid>
      <description>Did you know that in .NET you can resolve specific dependencies using Factories? We&amp;rsquo;ll use them to switch between concrete classes based on the current HTTP Request</description>
    </item>
    
    <item>
      <title>C# Tip: use the Ping class instead of an HttpClient to ping an endpoint</title>
      <link>https://www.code4it.dev/csharptips/ping-endpoint/</link>
      <pubDate>Tue, 19 Oct 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/ping-endpoint/</guid>
      <description>Sometimes you need to ping some endpoints. Don&amp;rsquo;t rely on HttpClient, but use the native Ping class.</description>
    </item>
    
    <item>
      <title>How to test HttpClientFactory with Moq</title>
      <link>https://www.code4it.dev/blog/testing-httpclientfactory-moq/</link>
      <pubDate>Tue, 28 Sep 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/testing-httpclientfactory-moq/</guid>
      <description>Mocking IHttpClientFactory is hard, but luckily we can use some advanced features of Moq to write better tests.</description>
    </item>
    
    <item>
      <title>C# tip: define Using Aliases to avoid ambiguity</title>
      <link>https://www.code4it.dev/csharptips/using-alias/</link>
      <pubDate>Tue, 21 Sep 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/using-alias/</guid>
      <description>Sometimes we need to use objects with the same name but from different namespaces. How to remove that ambiguity? By Using Aliases!</description>
    </item>
    
    <item>
      <title>C# tip: create correct DateTimes with DateTimeKind</title>
      <link>https://www.code4it.dev/csharptips/datetimekind/</link>
      <pubDate>Sat, 07 Aug 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/datetimekind/</guid>
      <description>Creating simple DateTimes creates issues when handling timezones. You can solve some issues by using DateTimeKind</description>
    </item>
    
    <item>
      <title>Simplify debugging with DebuggerDisplay attribute in .NET</title>
      <link>https://www.code4it.dev/blog/debuggerdisplay-attribute/</link>
      <pubDate>Tue, 13 Jul 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/debuggerdisplay-attribute/</guid>
      <description>Debugging our .NET applications can be cumbersome. With the DebuggerDisplay attribute we can simplify it by displaying custom messages.</description>
    </item>
    
    <item>
      <title>C# tip: String.IsNullOrEmpty or String.IsNullOrWhiteSpace?</title>
      <link>https://www.code4it.dev/csharptips/string-isnullorempty-isnullorwhitespace/</link>
      <pubDate>Tue, 06 Jul 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/string-isnullorempty-isnullorwhitespace/</guid>
      <description>Is your string really empty, or has it hidden characters? With String.IsNullOrEmpty and String.IsNullOrWhiteSpace you can find it</description>
    </item>
    
    <item>
      <title>Handling Azure Service Bus errors with .NET</title>
      <link>https://www.code4it.dev/blog/azure-service-bus-errors/</link>
      <pubDate>Tue, 29 Jun 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/azure-service-bus-errors/</guid>
      <description>Senders and Receivers handle errors on Azure Service Bus differently. We&amp;rsquo;ll see how to catch them, what they mean and how to fix them. We&amp;rsquo;ll also introduce Dead Letters.</description>
    </item>
    
    <item>
      <title>Azure Service Bus: Queues vs Topics</title>
      <link>https://www.code4it.dev/blog/azure-service-bus-queue-vs-topic/</link>
      <pubDate>Tue, 15 Jun 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/azure-service-bus-queue-vs-topic/</guid>
      <description>Queues or Topics? How are they similar and how they are different? We&amp;rsquo;ll see how to use those capabilities in Azure Service Bus with .NET and C#</description>
    </item>
    
    <item>
      <title>C# tip: how to get the index of an item in a foreach loop</title>
      <link>https://www.code4it.dev/csharptips/how-to-get-item-index-in-foreach/</link>
      <pubDate>Tue, 08 Jun 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/csharptips/how-to-get-item-index-in-foreach/</guid>
      <description>Do you need the index of the current item in a foreach loop with C#? Here you&amp;rsquo;ll see two approaches.</description>
    </item>
    
    <item>
      <title>Azure Service Bus and C# - an introduction</title>
      <link>https://www.code4it.dev/blog/azure-service-bus-introduction/</link>
      <pubDate>Tue, 01 Jun 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/azure-service-bus-introduction/</guid>
      <description>Azure Service bus is a message broker generally used for sharing messages between applications. In this article, we&amp;rsquo;re gonna see an introduction to Azure Service Bus, and how to work with it with .NET and C#</description>
    </item>
    
    <item>
      <title>How to expose .NET Assembly Version via API endpoint routing</title>
      <link>https://www.code4it.dev/blog/assembly-version-via-api-endpoint-routing/</link>
      <pubDate>Tue, 18 May 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/assembly-version-via-api-endpoint-routing/</guid>
      <description>Knowing the Assembly Version of the API you&amp;rsquo;ve deployed on an environment may be helpful for many reasons. We&amp;rsquo;re gonna see why, how to retrieve it, and how to expose it with Endpoint Routing  (bye-bye Controllers and Actions!)</description>
    </item>
    
    <item>
      <title>14 to 2 seconds: how I improved the performance of an endpoint by 82% - part 2</title>
      <link>https://www.code4it.dev/blog/improving-application-performance-part2/</link>
      <pubDate>Tue, 09 Mar 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/improving-application-performance-part2/</guid>
      <description>Language details may impact application performance. In this article we&amp;rsquo;ll see some of the C# tips that brought me to improve my application. Singleton creation, StringBuilder and more!</description>
    </item>
    
    <item>
      <title>14 to 2 seconds: how I improved the performance of an endpoint by 82% - part 1</title>
      <link>https://www.code4it.dev/blog/improving-application-performance-part1/</link>
      <pubDate>Tue, 23 Feb 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/improving-application-performance-part1/</guid>
      <description>Having fast API response is crucial for your applications. In this article you&amp;rsquo;ll see how I managed to improve an API application that took 14 secs each call.</description>
    </item>
    
    <item>
      <title>3 ways to inject DateTime and test it</title>
      <link>https://www.code4it.dev/blog/inject-and-test-datetime-dependency/</link>
      <pubDate>Tue, 12 Jan 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/inject-and-test-datetime-dependency/</guid>
      <description>DateTime, Guid, and Random values are not under your direct control. You should abstract them to write better code and testing. We&amp;rsquo;ll see 3 ways to inject and test them in .NET Core projects.</description>
    </item>
    
    <item>
      <title>How to use String.Format - and why you should care about it</title>
      <link>https://www.code4it.dev/blog/how-to-use-string-format/</link>
      <pubDate>Tue, 01 Dec 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/how-to-use-string-format/</guid>
      <description>Is string.Format obsolete? Not at all, it still has cards to play! Let&amp;rsquo;s see how we can customize format and create custom formatters.</description>
    </item>
    
    <item>
      <title>How to Ping an endpoint with C#</title>
      <link>https://www.code4it.dev/blog/ping-endpoint-csharp/</link>
      <pubDate>Tue, 17 Nov 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/ping-endpoint-csharp/</guid>
      <description>How to effectively ping an endpoint in C#? Don&amp;rsquo;t use the HttpClient, when .NET provides a Ping class to perform all these operations.</description>
    </item>
    
    <item>
      <title>How to integrate MongoDB with C#</title>
      <link>https://www.code4it.dev/blog/mongodb-introduction-with-csharp/</link>
      <pubDate>Tue, 03 Nov 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/mongodb-introduction-with-csharp/</guid>
      <description>MongoDB is a database based on JSON-like documents, but it can be queried using C#. We&amp;rsquo;ll see how to perform CRUD operations and we&amp;rsquo;ll create some advanced queries.</description>
    </item>
    
    <item>
      <title>How to generate code from OpenAPI definition with Visual Studio 2019</title>
      <link>https://www.code4it.dev/blog/openapi-code-generation-vs2019/</link>
      <pubDate>Tue, 06 Oct 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/openapi-code-generation-vs2019/</guid>
      <description>Wouldn&amp;rsquo;t it be nice if Visual Studio could autogenerate clients for external API? It is actually possible, if they expose an OpenAPI file. Let&amp;rsquo;s see how!</description>
    </item>
    
    <item>
      <title>Understanding Swagger integration in .NET Core</title>
      <link>https://www.code4it.dev/blog/swagger-integration/</link>
      <pubDate>Tue, 25 Aug 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/swagger-integration/</guid>
      <description>Swagger is a tool that exposes the documentation of your APIs and helps collaborating with other teams. We&amp;rsquo;ll see how to integrate it with .NET Core 3, how to add XML comments and status codes.</description>
    </item>
    
    <item>
      <title>How to run integration tests for .NET API</title>
      <link>https://www.code4it.dev/blog/integration-tests-for-dotnet-api/</link>
      <pubDate>Tue, 11 Aug 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/integration-tests-for-dotnet-api/</guid>
      <description>Integration tests are useful to check if multiple components fit together well. How can you test your APIs? And how can you mock dependencies?</description>
    </item>
    
    <item>
      <title>5 things about DateTime time zones and formatting</title>
      <link>https://www.code4it.dev/blog/5-things-datetime-timezones-and-formatting/</link>
      <pubDate>Tue, 28 Jul 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/5-things-datetime-timezones-and-formatting/</guid>
      <description>You&amp;rsquo;re using DateTime.Now, aren&amp;rsquo;t you? Be careful, because it may bring some troubles to your application. Here I&amp;rsquo;ll explain why and I&amp;rsquo;ll talk about time zones and formatting in C# DateTime.</description>
    </item>
    
    <item>
      <title>How to mock dependencies with Manifest resources</title>
      <link>https://www.code4it.dev/blog/mock-dependency-with-manifest-resources/</link>
      <pubDate>Tue, 14 Jul 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/mock-dependency-with-manifest-resources/</guid>
      <description>Sometimes on your tests you need to access test files, for example for mocking external data. With manifest resources you can easily reference files for your tests.</description>
    </item>
    
    <item>
      <title>Enum.HasFlag performance with BenchmarkDotNet</title>
      <link>https://www.code4it.dev/blog/hasflag-performance-benchmarkdotnet/</link>
      <pubDate>Tue, 30 Jun 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/hasflag-performance-benchmarkdotnet/</guid>
      <description>BenchmarkDotNet allows you to test the performance on .NET methods. So let&amp;rsquo;s answer a question: is the Enum.HasFlag method really that slow?</description>
    </item>
    
    <item>
      <title>Cool validation with FluentValidation</title>
      <link>https://www.code4it.dev/blog/fluentvalidation/</link>
      <pubDate>Tue, 16 Jun 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/fluentvalidation/</guid>
      <description>Validating inputs is crucial for every application. If you want an easy and versatile way, you can try FluentValidation.</description>
    </item>
    
    <item>
      <title>Testing internal members with InternalsVisibleTo</title>
      <link>https://www.code4it.dev/blog/testing-internals-with-internalsvisibleto/</link>
      <pubDate>Tue, 02 Jun 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/testing-internals-with-internalsvisibleto/</guid>
      <description>Internal members can be accessed only within the same assembly. And for different assemblies? Here&amp;rsquo;s for you the InternalsVisibleTo attribute!</description>
    </item>
    
    <item>
      <title>Dependency Injection lifetimes in .NET - Scoped vs Transient vs Singleton</title>
      <link>https://www.code4it.dev/blog/dependency-injection-lifetimes/</link>
      <pubDate>Tue, 26 May 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/dependency-injection-lifetimes/</guid>
      <description>Singleton, Scoped and Transient: these are the possible lifetimes for DI with .NET Core. How do they change the way objects are constructed?</description>
    </item>
    
    <item>
      <title>5 more things you should know about enums in C#</title>
      <link>https://www.code4it.dev/blog/5-more-things-about-enums-csharp/</link>
      <pubDate>Tue, 19 May 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/5-more-things-about-enums-csharp/</guid>
      <description>We&amp;rsquo;ve already seen some of the things you should know about enums in C#. Here we&amp;rsquo;ll dive into Flagged enumerations, serialization and so on.</description>
    </item>
    
    <item>
      <title>5 things you should know about enums in C#</title>
      <link>https://www.code4it.dev/blog/5-things-enums-csharp/</link>
      <pubDate>Tue, 05 May 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/5-things-enums-csharp/</guid>
      <description>Enums are often used with C#. Boring, right? Maybe there is something you didn&amp;rsquo;t know: casting, parsing and flagged enums.</description>
    </item>
    
    <item>
      <title>First steps with asynchronous programming in C#</title>
      <link>https://www.code4it.dev/blog/asynchronous-programming-in-csharp/</link>
      <pubDate>Tue, 31 Mar 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/asynchronous-programming-in-csharp/</guid>
      <description>Asynchronous programming is often seen as something cumbersome, so many developers avoid it. What, why and how to use it? Here are the first steps you can take to approach async programming.</description>
    </item>
    
    <item>
      <title>How to get video details from YouTube with .NET Core 3</title>
      <link>https://www.code4it.dev/blog/get-youtube-video-details-dotnet/</link>
      <pubDate>Tue, 17 Mar 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/get-youtube-video-details-dotnet/</guid>
      <description>We have already seen how to search for videos in a YouTube channel. Now it&amp;rsquo;s time to get details for a single video.</description>
    </item>
    
    <item>
      <title>How to search for YouTube videos in a channel with .NET Core 3</title>
      <link>https://www.code4it.dev/blog/search-youtube-videos-dotnet/</link>
      <pubDate>Mon, 02 Mar 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/search-youtube-videos-dotnet/</guid>
      <description>YouTube provides some APIs for getting info about a channel videos. But they also provide .NET libraries to achieve the same result with C#. Let&amp;rsquo;s have a try!</description>
    </item>
    
    <item>
      <title>How you can create extension methods in C#</title>
      <link>https://www.code4it.dev/blog/csharp-extension-methods/</link>
      <pubDate>Tue, 18 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/csharp-extension-methods/</guid>
      <description>Extension methods in C# are really useful, but there are few rules to follow&amp;hellip;</description>
    </item>
    
    <item>
      <title>MSTest CollectionAssert class - an overview</title>
      <link>https://www.code4it.dev/blog/mstests-collectionassert-overview/</link>
      <pubDate>Tue, 04 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/mstests-collectionassert-overview/</guid>
      <description>The CollectionAssert class if fine for basic tests on collections in C#. We will have a look at the methods exposed by this class.</description>
    </item>
    
    <item>
      <title>5 things you didn&#39;t know about Guid in C#</title>
      <link>https://www.code4it.dev/blog/5-things-about-guid-in-csharp/</link>
      <pubDate>Tue, 21 Jan 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/5-things-about-guid-in-csharp/</guid>
      <description>I&amp;rsquo;m pretty sure that you&amp;rsquo;ve already used Guids in C#, but have you ever stopped to think what they are under the hood? Here are 5 things you might not know about them.</description>
    </item>
    
    <item>
      <title>A few tips for performance optimization</title>
      <link>https://www.code4it.dev/blog/few-tips-for-performance-optimization/</link>
      <pubDate>Mon, 06 Jan 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/few-tips-for-performance-optimization/</guid>
      <description>More than 50% of mobile users abandon a website if it takes more than 3 seconds to load. Here you&amp;rsquo;ll learn few trick to improve your site performance.</description>
    </item>
    
    <item>
      <title>A recap of my 30ArticlesForNovember</title>
      <link>https://www.code4it.dev/blog/30articlesfornovember-a-recap/</link>
      <pubDate>Thu, 05 Dec 2019 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/30articlesfornovember-a-recap/</guid>
      <description>On November I shared on Twitter an article each day. They were about C#, general programming and advanced topics. For celebrating the conclusion of this challenge, I wrote a poem about that.</description>
    </item>
    
    <item>
      <title>C# sorting - a subtle mistake</title>
      <link>https://www.code4it.dev/blog/csharp-sorting-mistake/</link>
      <pubDate>Fri, 15 Nov 2019 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/csharp-sorting-mistake/</guid>
      <description>Is it true that the inverse of a negative number is always a positive number? If you think it&amp;rsquo;s true, you might get a subtle error while implementing comparison.</description>
    </item>
    
    <item>
      <title>MSTest StringAssert class - an overview</title>
      <link>https://www.code4it.dev/blog/mstests-stringassert-overview/</link>
      <pubDate>Wed, 20 Mar 2019 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/mstests-stringassert-overview/</guid>
      <description>The StringAssert class is a hidden feature of the MSStest framework. Not so many methods, but they can help you with basic tests with strings.</description>
    </item>
    
    <item>
      <title>MSTest Assert class - an overview</title>
      <link>https://www.code4it.dev/blog/mstests-assert-overview/</link>
      <pubDate>Wed, 05 Dec 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/mstests-assert-overview/</guid>
      <description>The Assert class is the first step you&amp;rsquo;ll probably take into unit testing. But do you know that there&amp;rsquo;s more than the IsTrue() method?</description>
    </item>
    
    <item>
      <title>A few things I learned at .NET Conference Italia 2018</title>
      <link>https://www.code4it.dev/blog/dotnet-conference-italia-2018/</link>
      <pubDate>Mon, 29 Oct 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/dotnet-conference-italia-2018/</guid>
      <description>Some of the things I learned at .NET Conf Italia: interfaces and abstract classes, Blazor, C# default interfaces and .NET Core on Samsung TV</description>
    </item>
    
    <item>
      <title>How to check if a string is really empty with C#</title>
      <link>https://www.code4it.dev/blog/csharp-check-if-string-is-empty/</link>
      <pubDate>Mon, 01 Oct 2018 00:00:00 +0000</pubDate>
      
      <guid>https://www.code4it.dev/blog/csharp-check-if-string-is-empty/</guid>
      <description>Is a string empty? What if it contains only white spaces? You shouldn&amp;rsquo;t reinvent the wheel, since .NET exposes methods exactly for these cases: String.IsNullOrEmpty and String.IsNullOrWhiteSpace.</description>
    </item>
    
  </channel>
</rss>
