That is indicating that they are basing, or calling, another constructor in the class when this one gets called and passing the value as an array of BarInterval
. In this case it's not a base class because otherwise it would say : base(...)
, it's another constructor defined in this very same class.
This is very common because you want to access a class a number of different ways, and in this case, it appears they wanted to be able to send just a single object at times without setting up an array in the code.
However, one thing they could have done is just changed the other constructor, the one being called with : this
to be this:
public BarListTracker(params BarInterval[] interval)
and they wouldn't have even needed the second constructor. It's a cleaner solution and yields the same results everywhere. The other constructor still gets an array, you can even pass an array to it if you wanted:
var arrOfBarInterval = new BarInterval[] { val1, val2 };
var tracker = new BarListTracker(arrOfBarInterval);
But, you can also just pass one:
var tracker = new BarListTracker(barInterval);
If you have the ability to do that I would recommend it.
One caveat to note, the : this(...)
constructor gets called and executed before the constructor you're in. Keep that in mind when building logic.