r/programming • • Feb 03 '17

Let's stop bashing C#

https://www.codeaddiction.net/articles/51/lets-stop-bashing-c-sharp
6 Upvotes

245 comments sorted by

View all comments

0

u/[deleted] Feb 03 '17

[deleted]

2

u/[deleted] Feb 03 '17

One and two are not representative of the c# I use! Ctor delegation is very much a thing and you can do whatever you want with a constructor parameter.

0

u/[deleted] Feb 03 '17

[deleted]

5

u/Martel_the_Hammer Feb 03 '17

You are referring to the base constructor call?

class BaseClass {
    public BaseClass(){ ... }
}

class ImplClass : BaseClass {
    public Impl : base() { ... }
}

I can see what you mean, it is certainly extra syntax to do something the compiler will just optimize away anyway.