I have been watching a PluralSight video on Generics in C# (so doesnt cover this code specifically) and the example code has a constructor set out in a manner which I've never seen before:
public CircularBuffer()
: this(capacity: 10)
{
}
public CircularBuffer(int capacity)
{
// Other code here
}
The constructor is called like so
var cb = new CircularBuffer(capacity: 3);
What is this notation and when was it introduced? Are there any special considerations when using it? What is it there for and what benefit does it have over existing solutions?