If a method is created like below, what is the result of ":this()" at the end? why can it be needed?
public Product(int new_id, short product_name, string product_type) : this()
Thanks
Method created with this() in header
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Mar 26, 2013, 4:55 AM EDT
The Product class contains (at least) two constructors. One takes three arguments (an int, short and a string) and the other takes no arguments.
When the constructor which takes 3 arguments is invoked, the first thing it does is to call the constructor which takes no arguments - this is what :this() does.
The body of the constructor then executes normally.
Constructor chaining therefore avoids having to duplicate code.