dotnetCampus.LatestCSharpFeatures 13.0.0

dotnet add package dotnetCampus.LatestCSharpFeatures --version 13.0.0
                    
NuGet\Install-Package dotnetCampus.LatestCSharpFeatures -Version 13.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="dotnetCampus.LatestCSharpFeatures" Version="13.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="dotnetCampus.LatestCSharpFeatures" Version="13.0.0" />
                    
Directory.Packages.props
<PackageReference Include="dotnetCampus.LatestCSharpFeatures" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add dotnetCampus.LatestCSharpFeatures --version 13.0.0
                    
#r "nuget: dotnetCampus.LatestCSharpFeatures, 13.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package dotnetCampus.LatestCSharpFeatures@13.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=dotnetCampus.LatestCSharpFeatures&version=13.0.0
                    
Install as a Cake Addin
#tool nuget:?package=dotnetCampus.LatestCSharpFeatures&version=13.0.0
                    
Install as a Cake Tool

Latest CSharp Features

English 简体中文 繁體中文

NuGet

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.


<PackageReference Include="dotnetCampus.LatestCSharpFeatures" Version="12.0.0" PrivateAssets="all" />

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:


<DefineConstants>$(DefineConstants);USE_PUBLIC_LATEST_CSHARP_FEATURES</DefineConstants>

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:


<DefineConstants>$(DefineConstants);DISABLE_LATEST_CSHARP_FEATURES_INDEX_RANGE</DefineConstants>

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!

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETFramework 4.0

  • .NETStandard 2.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on dotnetCampus.LatestCSharpFeatures:

Package Downloads
dotnetCampus.Ipc.Analyzers

本机内多进程通讯库,稳定 IPC 通讯库

dotnetCampus.Ipc.SourceGenerators

本机内多进程通讯库,稳定 IPC 通讯库

DotNetCampus.CommandLine.Analyzer

使用源生成器高性能地辅助你的应用程序解析几种主流风格的命令行。

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on dotnetCampus.LatestCSharpFeatures:

Repository Stars
RRQM/TouchSocket
TouchSocket is an integrated .NET networking framework that includes modules for socket, TCP, UDP, SSL, named pipes, HTTP, WebSocket, RPC, and more. It offers a one-stop solution for TCP packet issues and enables quick implementation of custom data message parsing using protocol templates.
lindexi/lindexi_gd
博客用到的代码
dotnet-campus/dotnetCampus.Ipc
本机内多进程通讯库
Version Downloads Last Updated
13.0.0 196 8/29/2025
13.0.0-alpha01 182 4/29/2025
12.0.1 4,605 11/8/2024
12.0.0 1,160 4/30/2024
12.0.0-alpha03 139 4/28/2024
12.0.0-alpha01 148 4/27/2024
11.0.0 176 4/27/2024
11.0.0-alpha03 195 6/7/2023
11.0.0-alpha02 186 6/6/2023
11.0.0-alpha01 186 6/2/2023
0.0.1-alpha01 196 6/1/2023