12 Replies
In this case, nothing
But an empty constructor can still be somewhat useful, like making it private for ex
so this is a default thing whether I write or not
Yes
And depending on when that code was made, it could have been a necessity. Auto constructors are still pretty new
Implicit default constructors are C# 1.0
huh I swear I read about it being a new feature just years back
.net 5 or 6
There's no such thing as auto-constructors either as far as I'm aware
Made up the term
The newest thing I can think of are record ctors with the primary ctor style
for
struct
s, the ability to declare a default constructor is very new
for classes, if you do not declare any constructors, C# will generate public X() { /* Do nothing */ }
for you, and it has always been that wayThat must be the one I heard of then
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.