-
I'd like to create custom guard methods but be able to use them transparently as if they were native from the original NuGet package. Example:
But Am I doomed to not do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You'd just have to create your own static class for now. Eventually C# will get some extension feature that allows you to add on to a static class, but that's been coming soon for a while now. (Sometimes referred to as "Extension everything" in the past, but then got superseded by "roles", I believe that discussion had happened here: dotnet/csharplang#5485) They're doing some restructuring on the C# repo, so I don't even know where the latest info tracking its status is, this was the best I could find as a pointer: dotnet/csharplang#8431 |
Beta Was this translation helpful? Give feedback.
You'd just have to create your own static class for now.
Eventually C# will get some extension feature that allows you to add on to a static class, but that's been coming soon for a while now. (Sometimes referred to as "Extension everything" in the past, but then got superseded by "roles", I believe that discussion had happened here: dotnet/csharplang#5485)
They're doing some restructuring on the C# repo, so I don't even know where the latest info tracking its status is, this was the best I could find as a pointer: dotnet/csharplang#8431