I've been learning C# and wanted to review some open source projects to see some good written code. I found a project called Todomoo on sourceforge and there's a part that is puzzling me:
public class Category {
// Note properties
private int id = 0;
private string name = "";
private Color colour = Color.Gray;
/// <summary>
/// Create a new category.
/// </summary>
public Category() { }
/// <summary>
/// Load a category from the database.
/// </summary>
/// <param name="Id">ID of the category</param>
public Category(int id) : base() {
Load(id);
}
Here it uses base() in one of the constructors, but the class is not a derived class. So what exactly is that for?
And why is the syntax of base() is that way and not like:
public Category(int id) {
base();
Load(id);
}