Non abstract empty bodyed constructors? #8228
Unanswered
Shadowblitz16
asked this question in
Language Ideas
Replies: 1 comment 1 reply
-
Primary constructors? public class HashCode(string hashCode) : Createable<int>(() =>
{
return hasCode.GetHashCode()
}); Granted, you now could theoretically have access to that hashCode for the lifetime of the object ( If you access it, that is), so it's not ideal in that sense, but it's much less code than even your suggestion. I agree with the general idea though, I think everywhere you have to add some random character(s) for seemingly no reason they should be optional. |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Can we get bodyless constructors for non abstract classes for situations where we just need to pass something to base()?
it would simply act like this...
Note these are just example classes, I am actually using this pattern for Textures
Beta Was this translation helpful? Give feedback.
All reactions