Skip to content

How to add my own methods to Guard? #975

Answered by hawkerm
Kilazur asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Sergio0694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants