- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Let's Explore Global Usings in C# 10
Global usings are a [new feature in C# 10](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10#global-using-directives) that give you the ability to declare a using directive over every source file in your project instead of needing to duplicate the declaration inside of each file in your projects! This can help you reduce the duplicated code in your projects and make commonly used libraries and namespaces more readily available across your project!
To use a global using you can add `global` before your using statements like this statement you might use in a data serializing/deserializing library:
```csharp
global using Newtonsoft.Json
```
Including a global using will cause the compiler to include the namespace when resolving types across the entire compilation of your project instead of scoping that reference to the file the using is a part of. What this typically means is that you will want to use this for common namespaces used across your project and continue using file based using statements when referencing more feature specific types.
You can find more information about using Global Usings as part of the using directive documentation here: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive#global-modifier
Global Usings are also part of the `ImplicitUsings` feature you might see in your `.csproj` files. To learn more about this feature you can watch this video! https://youtu.be/NlvhBpLl0DY
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u
This videos thumbnail uses a globe SVG from here: https://commons.wikimedia.org/wiki/File:Emojione_BW_1F30E.svg
Видео Let's Explore Global Usings in C# 10 канала World of Zero
To use a global using you can add `global` before your using statements like this statement you might use in a data serializing/deserializing library:
```csharp
global using Newtonsoft.Json
```
Including a global using will cause the compiler to include the namespace when resolving types across the entire compilation of your project instead of scoping that reference to the file the using is a part of. What this typically means is that you will want to use this for common namespaces used across your project and continue using file based using statements when referencing more feature specific types.
You can find more information about using Global Usings as part of the using directive documentation here: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive#global-modifier
Global Usings are also part of the `ImplicitUsings` feature you might see in your `.csproj` files. To learn more about this feature you can watch this video! https://youtu.be/NlvhBpLl0DY
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u
This videos thumbnail uses a globe SVG from here: https://commons.wikimedia.org/wiki/File:Emojione_BW_1F30E.svg
Видео Let's Explore Global Usings in C# 10 канала World of Zero
world of zero lets make global usings c#10 c# 10 c# csharp c sharp .net dotnet dot net .net6 .net 6 dotnet6 implicit usings .net features dotnet features c# features software engineering worldofzero sam wronski live coding visual studio software development coding example c# example c# tutorial c# features tutorial .net example c# demo .net demo coding demo programming coding in c# built with .net walkthrough c# how to c# coding net6.0 net6
Комментарии отсутствуют
Информация о видео
17 октября 2022 г. 21:00:44
00:09:00
Другие видео канала





















