---
title: "The Problem with C# 10 Implicit Usings - Muhammad Rehan Saeed"
description: "I tried using C# 10 implicit using statements and found that they had a fatal flaw which meant you couldn't use them under certain circumstances"
canonical_url: "https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/"
last_updated: "2021-10-13T09:24:00+00:00"
meta:
  author: "Muhammad Rehan Saeed"
  keywords: "C# 10,.NET,Implicit Using Statements"
  "og:description": "I tried using C# 10 implicit using statements and found that they had a fatal flaw which meant you couldn't use them under certain circumstances"
  "og:image": "https://rehansaeed.com/_og/s/o_96c6f177ff083f95.png"
  "og:image:alt": "The Problem with C# 10 Implicit Usings - Muhammad Rehan Saeed"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "The Problem with C# 10 Implicit Usings"
  "twitter:image": "https://rehansaeed.com/_og/s/o_96c6f177ff083f95.png"
  "twitter:image:alt": "The Problem with C# 10 Implicit Usings - Muhammad Rehan Saeed"
---

> Index of every page on this site: [llms.txt](https://rehansaeed.com/llms.txt)

# [The Problem with C# 10 Implicit Usings](https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/)

Posted 13 October 2021 - **3 min read**

![Microsoft .NET](https://rehansaeed.com/_ipx/f_webp&s_2560x1440/images/hero/Microsoft-.NET-1366x768.png)

Update (2021-10-14)

[Mark Rendle](https://twitter.com/markrendle) made an interesting suggestion on Twitter after seeing this blog post. I've updated the post below with his code.

Yesterday I livestreamed myself upgrading a project to .NET 6 and C# 10. Along the way I tried using a new C# 10 feature called [implicit using statements](https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/implicit-namespaces) and discovered that it wasn't quite as straightforward as I first thought and you should probably not use it under certain circumstances.

Here is the live stream for those who are interested (I'm eager to get any feedback on how I'm presenting as its not a natural skill for me):

# What are Implicit Using Statements?

Adding the line below to your `.csproj` project file turns the feature on:

```xml
<ImplicitUsings>enable</ImplicitUsings>
```

Once enabled, depending on the type of project you have created you'll have the following global using statements added to your project implicitly.

| SDK | Default namespaces |
| --- | --- |
| Microsoft.NET.Sdk | `System`<br>`System.Collections.Generic`<br>`System.IO`<br>`System.Linq`<br>`System.Net.Http`<br>`System.Threading`<br>`System.Threading.Tasks` |
| Microsoft.NET.Sdk.Web | `System.Net.Http.Json`<br>`Microsoft.AspNetCore.Builder`<br>`Microsoft.AspNetCore.Hosting`<br>`Microsoft.AspNetCore.Http`<br>`Microsoft.AspNetCore.Routing`<br>`Microsoft.Extensions.Configuration`<br>`Microsoft.Extensions.DependencyInjection`<br>`Microsoft.Extensions.Hosting`<br>`Microsoft.Extensions.Logging` |
| Microsoft.NET.Sdk.Worker | `Microsoft.Extensions.Configuration`<br>`Microsoft.Extensions.DependencyInjection`<br>`Microsoft.Extensions.Hosting`<br>`Microsoft.Extensions.Logging` |

Sounds great, now you can delete a large portion of the using statements in your project right? Well not so fast, here are some problems I discovered along the way.

## Build Errors

I discovered the first problem while multi-targetting a class library project for a NuGet package. I had targetted .NET 4.7.2 as well as other target frameworks like .NET 6 for backwards compatibility and found that `System.Net.Http` could not be found. It turns out I hadn't referenced that particular NuGet package for .NET 4.7.2 and was now getting a build error.

I could add the `System.Net.Http` NuGet package for .NET 4.7.2 on its own and that would solve the problem but I really didn't like having the overhead of another unnecessary package reference. That also means extra work for me to maintain updating the version number or relying on tools like [Dependabot](https://dependabot.com/) and [Renovate](https://www.whitesourcesoftware.com/free-developer-tools/renovate/) to submit PR's to upgrade the version number for me.

```xml
<ItemGroup Label="Package References (.NET 4.7.2)" Condition="'$(TargetFramework)' == 'net472'">
    <PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
```

[Mark Rendle](https://twitter.com/markrendle) on Twitter suggested another workaround after seeing this blog post. His suggestion was to remove the offending using statement in the `.csproj` file.

```xml
<ItemGroup>
    <Using Remove="System.Net.Http" />
</ItemGroup>
```

This looks awfully strange to me. I'm not sure how I feel about adding or removing namespaces from C# project files yet. It doesn't seem very discoverable to me. So in this particular case I'm happy to avoid using implicit using statements for now.

## What Using's Were Added?

The second problem is trying to understand what using's have been added. As you can see from the table above, you could go and look in the [documentation](https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/implicit-namespaces) to figure this out but that's slow and time consuming. Another alternative is actually to build your project and then look in its `obj` directory under:

```text
My.Project\obj\Debug\net472\My.Project.GlobalUsings.g.cs
```

That's not ideal either. I think Visual Studio should ideally show you these using statements somehow.

# Conclusions

Implicit usings are [enabled by default](https://devblogs.microsoft.com/dotnet/announcing-net-6-release-candidate-2/#net-sdk-c-project-templates-modernized) in the latest blank project templates shipped with .NET. Overall this is a cool feature that can remove the need for many duplicated lines of code in your project but I think there is a little too much magic going on here for my liking, so I think I'll be more careful about using this feature in the future.

## Web Mentions

[What's this?](https://en.wikipedia.org/wiki/Webmention)

### 0 Linked

### 0 Replies

## GitHub Comments

### 8 Comments

[Comment on GitHub](https://github.com/RehanSaeed/rehansaeed.github.io/issues/498)

[![sam-wheat](https://avatars.githubusercontent.com/u/16885210?v=4)](https://github.com/sam-wheat "sam-wheat")

### [sam-wheat](https://github.com/sam-wheat)

30 November 2021

Another problem with implicit global usings is that because .net creates the globalusings file in the obj folder it does not create a file that you can modify as part of your project. I think the correct behavior should be that .net creates a file for you that you can modify . Also, if you use VS intellisense to add a using statement it adds the using to the current file only. If you are using a GlobalUsings.cs file the using... statement will be added to the wrong file.

[![teo-tsirpanis](https://avatars.githubusercontent.com/u/12659251?v=4)](https://github.com/teo-tsirpanis "teo-tsirpanis")

### [teo-tsirpanis](https://github.com/teo-tsirpanis)

16 January 2023

You shouldn't use the `System.Net.Http` NuGet package, [it's super old](https://www.nuget.org/packages/System.Net.Http#versions-body-tab). Instead you should add a `<Reference Include="System.Net.Http" />` item in your project; that references the built-in assembly in the framework.

[![XtroTheArctic](https://avatars.githubusercontent.com/u/6631429?v=4)](https://github.com/XtroTheArctic "XtroTheArctic")

### [XtroTheArctic](https://github.com/XtroTheArctic)

9 August 2023

Can you please make the font of your blog website even bigger so it becomes totally unreadable instead of being partially unreadable?

[![sam-wheat](https://avatars.githubusercontent.com/u/16885210?v=4)](https://github.com/sam-wheat "sam-wheat")

### [sam-wheat](https://github.com/sam-wheat)

9 August 2023

[@XtroTheArctic](https://github.com/XtroTheArctic) It's not that the font is big - it's that you are small.

[![XtroTheArctic](https://avatars.githubusercontent.com/u/6631429?v=4)](https://github.com/XtroTheArctic "XtroTheArctic")

### [XtroTheArctic](https://github.com/XtroTheArctic)

10 August 2023

Fair enough! I was joking you know. But still, your font is too big compared to the Internet standards :)

[![XtroTheArctic](https://avatars.githubusercontent.com/u/6631429?v=4)](https://github.com/XtroTheArctic "XtroTheArctic")

### [XtroTheArctic](https://github.com/XtroTheArctic)

10 August 2023

Oh I just noticed your social buttons don't work. Just in case you want to fix them.  
[![image](https://private-user-images.githubusercontent.com/6631429/259589767-1a3c213f-d73d-4102-ae8b-470347e094db.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI5NTE1NjYsIm5iZiI6MTc5Mjk1MTI2NiwicGF0aCI6Ii82NjMxNDI5LzI1OTU4OTc2Ny0xYTNjMjEzZi1kNzNkLTQxMDItYWU4Yi00NzAzNDdlMDk0ZGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTAyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjEwMjVUMTgwMTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDM5Yjk2ZDhjNGY5M2ZiNmI4Mjg2YzllY2U4YTIyNjk4OTY2MThkOTQ3N2EwNDk1YTA2OWMyZDNiNmIyNjg2MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.ROw1jGCTzkaSmdU4iEHX8S8Vd5iAIXHLbpsrVdd_1oo)](https://private-user-images.githubusercontent.com/6631429/259589767-1a3c213f-d73d-4102-ae8b-470347e094db.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI5NTE1NjYsIm5iZiI6MTc5Mjk1MTI2NiwicGF0aCI6Ii82NjMxNDI5LzI1OTU4OTc2Ny0xYTNjMjEzZi1kNzNkLTQxMDItYWU4Yi00NzAzNDdlMDk0ZGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTAyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjEwMjVUMTgwMTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDM5Yjk2ZDhjNGY5M2ZiNmI4Mjg2YzllY2U4YTIyNjk4OTY2MThkOTQ3N2EwNDk1YTA2OWMyZDNiNmIyNjg2MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.ROw1jGCTzkaSmdU4iEHX8S8Vd5iAIXHLbpsrVdd_1oo)

[![sam-wheat](https://avatars.githubusercontent.com/u/16885210?v=4)](https://github.com/sam-wheat "sam-wheat")

### [sam-wheat](https://github.com/sam-wheat)

10 August 2023

[@XtroTheArctic](https://github.com/XtroTheArctic) Which page are you referring to - or the whole site?

[![XtroTheArctic](https://avatars.githubusercontent.com/u/6631429?v=4)](https://github.com/XtroTheArctic "XtroTheArctic")

### [XtroTheArctic](https://github.com/XtroTheArctic)

10 August 2023

Originally, I was commenting on [@RehanSaeed](https://github.com/RehanSaeed)'s blog website. Here is its big font size compared to CNN's text size which is also kinda big:  
[![image](https://private-user-images.githubusercontent.com/6631429/259646355-3eadb2a4-9efd-45f5-8095-ea88358f017c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI5NTE1NjYsIm5iZiI6MTc5Mjk1MTI2NiwicGF0aCI6Ii82NjMxNDI5LzI1OTY0NjM1NS0zZWFkYjJhNC05ZWZkLTQ1ZjUtODA5NS1lYTg4MzU4ZjAxN2MucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTAyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjEwMjVUMTgwMTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzgxZThhMTUxNzk1ZjgzOWQ4YzIwZWIzZmJlZjNmYTkxYWYxYjUzYjNjMWUzYzMwOGEzNGI4M2E4ZmYwN2Q1MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.WO6tBwzOCLFwo6nc3ElO_dn7nPra8orPCxLKSeUQ3xY)](https://private-user-images.githubusercontent.com/6631429/259646355-3eadb2a4-9efd-45f5-8095-ea88358f017c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI5NTE1NjYsIm5iZiI6MTc5Mjk1MTI2NiwicGF0aCI6Ii82NjMxNDI5LzI1OTY0NjM1NS0zZWFkYjJhNC05ZWZkLTQ1ZjUtODA5NS1lYTg4MzU4ZjAxN2MucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTAyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjEwMjVUMTgwMTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzgxZThhMTUxNzk1ZjgzOWQ4YzIwZWIzZmJlZjNmYTkxYWYxYjUzYjNjMWUzYzMwOGEzNGI4M2E4ZmYwN2Q1MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.WO6tBwzOCLFwo6nc3ElO_dn7nPra8orPCxLKSeUQ3xY)

After you [@sam-wheat](https://github.com/sam-wheat) joined the conversation, I checked your sites too:  
[![image](https://private-user-images.githubusercontent.com/6631429/259646577-13860d26-7b6c-474a-9ee0-20c62ba6034d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI5NTE1NjYsIm5iZiI6MTc5Mjk1MTI2NiwicGF0aCI6Ii82NjMxNDI5LzI1OTY0NjU3Ny0xMzg2MGQyNi03YjZjLTQ3NGEtOWVlMC0yMGM2MmJhNjAzNGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTAyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjEwMjVUMTgwMTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmM4MTY3MzAxOTYyZDk2YWRkNDJhMjkyMGY1NjYzZWUwNDRjMGU2NjE1YjU2ZDA0Y2RlM2NjOWUwNjg3NGJiYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.abFJlw-foiTTo2_JKXauSaUvHYvjgVUmNsWhqwHwcLQ)](https://private-user-images.githubusercontent.com/6631429/259646577-13860d26-7b6c-474a-9ee0-20c62ba6034d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI5NTE1NjYsIm5iZiI6MTc5Mjk1MTI2NiwicGF0aCI6Ii82NjMxNDI5LzI1OTY0NjU3Ny0xMzg2MGQyNi03YjZjLTQ3NGEtOWVlMC0yMGM2MmJhNjAzNGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTAyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjEwMjVUMTgwMTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmM4MTY3MzAxOTYyZDk2YWRkNDJhMjkyMGY1NjYzZWUwNDRjMGU2NjE1YjU2ZDA0Y2RlM2NjOWUwNjg3NGJiYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.abFJlw-foiTTo2_JKXauSaUvHYvjgVUmNsWhqwHwcLQ)  
[![image](https://private-user-images.githubusercontent.com/6631429/259646664-74a37030-1440-4f43-bd59-7a9e318b53aa.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI5NTE1NjYsIm5iZiI6MTc5Mjk1MTI2NiwicGF0aCI6Ii82NjMxNDI5LzI1OTY0NjY2NC03NGEzNzAzMC0xNDQwLTRmNDMtYmQ1OS03YTllMzE4YjUzYWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTAyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjEwMjVUMTgwMTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDQwZGRlZGM2NTg5YTVlMDYyNmJhMDU3YzY2ZjFkYmE0M2E2Y2M5NTA0ZjQ5MTBiMzI2ZTUwMTgzOTljMGYyNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0._dlNVHvw4Cz5W8axpDJBqX-O8YMMTx07O4MJNlsf8G8)](https://private-user-images.githubusercontent.com/6631429/259646664-74a37030-1440-4f43-bd59-7a9e318b53aa.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTI5NTE1NjYsIm5iZiI6MTc5Mjk1MTI2NiwicGF0aCI6Ii82NjMxNDI5LzI1OTY0NjY2NC03NGEzNzAzMC0xNDQwLTRmNDMtYmQ1OS03YTllMzE4YjUzYWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTAyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjEwMjVUMTgwMTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDQwZGRlZGM2NTg5YTVlMDYyNmJhMDU3YzY2ZjFkYmE0M2E2Y2M5NTA0ZjQ5MTBiMzI2ZTUwMTgzOTljMGYyNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0._dlNVHvw4Cz5W8axpDJBqX-O8YMMTx07O4MJNlsf8G8)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://rehansaeed.com/#website","@type":"WebSite","description":"Software Developer at Microsoft, YouTuber, Open Source Contributor and Blogger","inLanguage":"en-GB","name":"Muhammad Rehan Saeed","url":"https://rehansaeed.com/","author":{"@id":"https://rehansaeed.com/#identity"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://rehansaeed.com/?search={search_term_string}"},"query-input":"required name=search_term_string"}],"publisher":{"@id":"https://rehansaeed.com/#publisher"}},{"@id":"https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/#webpage","@type":"WebPage","dateModified":"2021-10-13T09:24:00+00:00","datePublished":"2021-10-13T09:24:00+00:00","description":"I tried using C# 10 implicit using statements and found that they had a fatal flaw which meant you couldn't use them under certain circumstances","name":"The Problem with C# 10 Implicit Usings","url":"https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/","breadcrumb":{"@id":"https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/#breadcrumb"},"isPartOf":{"@id":"https://rehansaeed.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/"]}]},{"@id":"https://rehansaeed.com/#identity","@type":"Person","name":"Muhammad Rehan Saeed","url":"https://rehansaeed.com/about/","image":{"@id":"https://rehansaeed.com/#/schema/image/1"},"sameAs":["https://github.com/RehanSaeed","https://www.linkedin.com/in/muhammad-rehan-saeed","https://stackoverflow.com/users/1212017/muhammad-rehan-saeed","https://www.youtube.com/c/MuhammadRehanSaeed","https://www.twitch.tv/rehansaeeduk"]},{"@id":"https://rehansaeed.com/#publisher","@type":"Organization","logo":"https://rehansaeed.com/images/schema/Publisher-600x60.png","name":"Muhammad Rehan Saeed","url":"https://rehansaeed.com"},{"@id":"https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/#article","@type":"Article","dateModified":"2021-10-13T09:24:00+00:00","datePublished":"2021-10-13T09:24:00+00:00","description":"I tried using C# 10 implicit using statements and found that they had a fatal flaw which meant you couldn't use them under certain circumstances","headline":"The Problem with C# 10 Implicit Usings","inLanguage":"en-GB","url":"https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/","author":{"@id":"https://rehansaeed.com/#identity"},"image":[{"@type":"ImageObject","url":"https://rehansaeed.com/images/hero/Microsoft-.NET-1366x768.png","caption":"Microsoft .NET","width":"1366","height":"768"}],"isPartOf":{"@id":"https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/#webpage"},"keywords":["C# 10",".NET","Implicit Using Statements"],"mainEntityOfPage":{"@id":"https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/#webpage"},"publisher":{"@id":"https://rehansaeed.com/#publisher"}},{"@id":"https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Blog","item":"https://rehansaeed.com/","position":1},{"@type":"ListItem","name":"The Problem with C# 10 Implicit Usings","item":"https://rehansaeed.com/the-problem-with-csharp-10-implicit-usings/","position":2}]},{"@id":"https://rehansaeed.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://rehansaeed.com/images/author/Muhammad-Rehan-Saeed/Logo-512x512.png","inLanguage":"en-GB","url":"https://rehansaeed.com/images/author/Muhammad-Rehan-Saeed/Logo-512x512.png"}]}
```

## Sitemap

See the full [sitemap](https://rehansaeed.com/sitemap.md) for all pages.
