An open API service indexing awesome lists of open source software.

https://github.com/dotnet-campus/dotnetcampus.latestcsharpfeatures

This open-source project provides a series of NuGet packages that allow you to use the latest C# language features in older versions of .NET.
https://github.com/dotnet-campus/dotnetcampus.latestcsharpfeatures

nullable-reference-types record required-fields

Last synced: 7 months ago
JSON representation

This open-source project provides a series of NuGet packages that allow you to use the latest C# language features in older versions of .NET.

Awesome Lists containing this project

README

          

# Latest CSharp Features

| [English][en] | [简体中文][zh-hans] | [繁體中文][zh-hant] |
| ------------- | ------------------- | ------------------- |

[en]: /README.md
[zh-hans]: /docs/README.zh-hans.md
[zh-hant]: /docs/README.zh-hant.md

[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures)

This open-source project provides a NuGet package, dotnetCampus.LatestCSharpFeatures, which allows you to use the latest C# language features in older versions of .NET, including the old .NET Framework, .NET Standard, and older versions of .NET Core App and .NET.

## How to Use

Simply install the dotnetCampus.LatestCSharpFeatures NuGet package.

```xml

```

If you want these new language features to also be effective for other projects that reference this project, you can add a conditional compilation symbol in the csproj file:

```xml

$(DefineConstants);USE_PUBLIC_LATEST_CSHARP_FEATURES
```

If your project already references other libraries that provide implementations of Index/Range, type conflicts may occur. In such cases, you can disable our Index/Range implementation:

```xml

$(DefineConstants);DISABLE_LATEST_CSHARP_FEATURES_INDEX_RANGE
```

> **Special Note**: Unlike other features, Index/Range types always maintain an internal access level and will not become public due to the `USE_PUBLIC_LATEST_CSHARP_FEATURES` setting. This is because Index/Range are used in public APIs, and if set to public, they may cause compatibility issues with other libraries that use the official Index/Range implementation. Other features are typically for internal use and do not cause such compatibility issues.

## Feedback and Contributions

We welcome feedback and contributions from all users. If you encounter any problems during use, or have any suggestions for improvements, you can submit them via GitHub Issues.

If you wish to participate in the development of the project, you are also very welcome! You can Fork this repository and then submit a Pull Request.

Thank you for your support and help with dotnetCampus.LatestCSharpFeatures!