IsExternalInit
PolySharp
IsExternalInit | PolySharp | |
---|---|---|
7 | 12 | |
94 | 1,631 | |
- | - | |
0.0 | 7.1 | |
over 1 year ago | 5 months ago | |
C# | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
IsExternalInit
-
Multi-targeted library, with a recent Language Version
You can also just reference the https://github.com/manuelroemer/IsExternalInit NuGet package.
-
Where’s C# headed? - Mads Torgersen - NDC Copenhagen 2022
init only properties (likely to come up if you use records) - you can either use the IsExternalInit nuget package or manually define the attributes - either way, the feature works perfectly fine
-
Is there a way to change my C# language version without editing the project file?
…and a NuGet reference to https://www.nuget.org/packages/IsExternalInit, I can then do public record Foo(string s); and have it build.
-
Ladies and gentlemen, C#. A package, you guessed it, for C#.
You only need https://github.com/manuelroemer/IsExternalInit for that (and to set LangVersion).
-
Do you apply new C# features to existing code after upgrading .NET version?
Even for .NET Framework code, I tend to use recent C# versions. I reference https://github.com/jnm2/ReferenceAssemblyAnnotator to get nullable support and https://github.com/manuelroemer/IsExternalInit for records, and that takes care of most of the features I care about.
- When do you use C#9 Records?
-
Can I use C#9.0 with ASP.NET Core 3.1?
features that require BCL additions. Since you're on the older BCL, those will need to be backported. For example, to use init; and record, you can use https://github.com/manuelroemer/IsExternalInit.
PolySharp
-
What's new in C# 12: overview
Great improvements.
There is PolySharp project that enables you to use most of C#11 features in legacy .NET Framework: https://github.com/Sergio0694/PolySharp - Seems that C#12 features are planned to be implemented: https://github.com/Sergio0694/PolySharp/issues/78
I'm using PolySharp where I'm stuck with .NET Framework 4.6 and I don't have any issues.
Hope one day I'd see concise syntax for catch and/or try expressions: https://github.com/dotnet/csharplang/discussions/2734 - but there is a lot of resistance.
-
.NET web developer takes a job as a .NET desktop developer
You can go one step further and add https://github.com/Sergio0694/PolySharp to your project and you can use new C# 8+ features that don't require the new runtime (like file scoped namesapces, nullable annotations etc).
-
[Question] HttpClient does not recover from error
Is there a reason you're trying to reinvent PolySharp?
-
Do you prefer working with Java or C# legacy code?
You can still use C# 11 (with PolySharp), and you can still get a huge amount of new APIs via the various packages on NuGet that target .NET Standard 2.0. Plus you just get the usual .NET type system and BCL, which are still very good even if when using a framework from a few years ago.
-
Multi-targeted library, with a recent Language Version
Or the PolySharp NuGet package, which uses source generators to polyfill the language features you're actually using.
-
Source Generator Debug always NulLReferecneException
Here's some: - MVVM Toolkit - PolySharp - ComputeSharp
-
What's the biggest difference between C# and Java developers?
Well using PolySharp, of course! 😄
-
How to use C# 11 features in .NET 6 or older versions (even .NET Framework 2.0)
⚠️ Because PolySharp uses source generators, it doesn't work with the package.config file as stated in this issue. The issue says we need to use the SDK style .csproj, but just changing from package.config to Package Reference worked for me.
- PolySharp: polyfills for C#
-
Playing with C# 12 & .NET 8
Some features like records and range require additional boilerplate classes to be added to become usable. You can DIY that or use PolySharp. Some features like static abstract members, default interface methods, etc require runtime support and can't be used.
What are some alternatives?
UtinyRipper - GUI and API library to work with Engine assets, serialized and bundle files
AnyDiff - A CSharp (C#) diff library that allows you to diff two objects and get a list of the differences back.
MSBuild.SDK.SystemWeb - This MSBuild SDK is designed to allow for the easy creation and use of SDK (shortform) projects targeting ASP.NET 4.x using System.Web.
NetworkPrimitives
monitor-table-change-with-sqltabledependency - Get SQL Server notification on record table change
csharplang - The official repo for the design of the C# programming language
ee.Yrewind - Program to rewind and save YouTube live stream
.NET Runtime - .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
project-system - The .NET Project System for Visual Studio
SharpLab - .NET language playground
Nullable - A source code only package which allows you to use .NET's nullable attributes in older target frameworks like .NET Standard 2.0 or the "old" .NET Framework.
Theraot - Backporting .NET and more: LINQ expressions in .net 2.0 - nuget Theraot.Core available.