The following code is from the AvalonEdit project:
// Creates a new TextEditor instance.
public TextEditor() : this(new TextArea())
{
}
I have no idea what the : this(new ... part does. Could you please help explain the C# syntax?
The following code is from the AvalonEdit project:
// Creates a new TextEditor instance.
public TextEditor() : this(new TextArea())
{
}
I have no idea what the : this(new ... part does. Could you please help explain the C# syntax?
 
    
    It means that this constructor calls another constructor which accepts argument of type TextArea. It is called constructor chaining.
See the link provided by @Lasse: http://msdn.microsoft.com/en-us/library/aa645603(v=vs.71).aspx
