I wonder if anyone can explain the syntax in one line of this snippet of code:
public class ContactController : Controller
{
private IContactManagerRepository _repository;
**public ContactController()
: this(new EntityContactManagerRepository())**
{}
public ContactController(IContactManagerRepository repository)
{
_repository = repository;
}
The bit I am particularly interested in is the first constructor. I understand from the article I got it from (http://www.asp.net/learn/mvc/tutorial-29-cs.aspx - listing 3) that the first constructor calls the second, and intellisense tells me when I hover over this(new EntityContactManagerRepository()) that it does indeed refer to the second constructor. But I haven't seen a constructor with a colon after it before. I know that the colon in the class declaration tells the compiler that ContactController inherits from Controller, but what does the colon in the constructor do?