This indicates that they base or call another constructor in the class when this call is called and passes the value in the form of an array of BarInterval . In this case, it is not a base class, because otherwise it would say : base(...) , this is another constructor defined in the same class.
This is very common because you want to access the class in several different ways, and in this case it seems that they want to be able to send only one object at a time, without tuning the array in the code.
However, one thing they could do is simply change another constructor, one that is called with : this , as follows:
public BarListTracker(params BarInterval[] interval)
and they wouldn’t even need a second constructor. This is a cleaner solution and gives the same results worldwide. Another constructor still gets an array, you can even pass an array to it if you want:
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 opportunity to do this, I would recommend it.
It should be noted that the constructor : this(...) is called and executed before the constructor you are in. Keep this in mind when building logic.
source share