我的WinForm類裏面我有構造構造帶接口鏈接作爲參數
private IBookRepository _Repository;
public AddEditForm(IBookRepository repository)
{
InitializeComponent();
_Repository = repository;
}
現在我想用構造函數鏈的某個地方,但我把它錯了。我
public AddEditForm(Book book) : this(IBookRepository repository)
{
...
}