So you are simply sharing a suggestion for feature that you wish C# had?
You could actually implement something like this in Enhanced C#, although the syntax would have to be different… and I think that’s a good thing, as no one is going to look at { #x } y
and be able to guess what it means.
It appears that you are proposing a system for generating code at compile time, but it is unclear how to generate useful code with it. For example, I would like to be able to write a class that “inherits” constructors from the base class:
class Base {
public Base(string s) {...}
public Base(Symbol s, int x) {...}
...
}
class Derived : Base {
// syntax for inheriting stuff?
}
How would I do that?