base::StaticMember syntax #9134
Unanswered
TahirAhmadov
asked this question in
Language Ideas
Replies: 3 comments 5 replies
-
How painful is it to declare an alias in the file? |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Reminds of me this proposal: If there was a keyword to qualify static members without the full type name maybe it could be extended to this case? protected static new readonly string Name = base(class).Name + " MyClass"; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If the base class is a generic type, especially with many type arguments, referencing static members on it (this is specifically a pain point when "hiding" those static members) becomes very long:
It would be much easier to do something like this:
Needless to say, I'm not stuck on
base::
syntax, but it does look like it can work - not ambiguous, easy to write, etc.Beta Was this translation helpful? Give feedback.
All reactions