feat(dotnet): dotnet 8 any type alias

This commit is contained in:
Marcello 2023-04-11 19:42:59 +02:00
parent 06ee959188
commit 196d6e99db

View file

@ -40,23 +40,26 @@ to native code later.
| Event, Enum, Enum Value, | PascalCase | | Event, Enum, Enum Value, | PascalCase |
| Variables, Parameters | camelCase | | Variables, Parameters | camelCase |
### Namespaces & Imports ### Namespaces, Imports & Aliases
Hierarchic organization of programs an libraries. Hierarchic organization of programs an libraries.
```cs ```cs
using System; // import the System Namespace using System; // import the System Namespace
using Alias = Namespace; // set an alias for a specific namespace
using static System.Console; // statically import a class to use its static methods w/o qualification using static System.Console; // statically import a class to use its static methods w/o qualification
// type aliases
using Alias = Namespace.SubNamespace.Type;
using LookupTable = Dictionary<string, string>;
using Points = (int, int, int)[];
// global using [C# 10], should be in dedicated file // global using [C# 10], should be in dedicated file
global using <namespace>; global using <namespace>;
namespace Namespace; // [C# 10] namespace Namespace; // [C# 10]
//or //or
namespace Namespace // namespace declaration namespace Namespace
{ {
// class here
} }
``` ```