Replies: 3 comments
-
Goal: MyClass.CustomExtension(data: 12); Possible implementation: public static class MyClassExtensions
{
public static void CustomExtension(
this MyClass,
int data)
{
...
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
That looks like a valid approach but we would need a solution for fields, properties, maybe even operators etc. @HardlyDifficult |
Beta Was this translation helpful? Give feedback.
0 replies
-
Check #192. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to see static extension methods in one of new upcoming C# versions. I'm actually trying to modify Roslyn and implement them on my own. But the one thing that I'm not sure about, how would the syntax look? All the extension methods already need to be static and inside of a static class. So I'll need some help from you guys on this one. Also, quote from an unofficial C# 8 feature overview:
I will leave this here just so they can take some inspiration from this if this gets more heat.
Beta Was this translation helpful? Give feedback.
All reactions