So, you would create a free interface like this:
class FluentTable
{
List<string> myTables = new List<string>();
public FluentTable addTableCellwithCheckbox(string chk, bool isUnchecked,
bool isWithoutLabel)
{
this.myTables.Add(chk);
return this;
}
public FluentTable addTableCellwithTextbox(string name, bool isEditable)
{
this.myTables.Add(name);
return this;
}
public static FluentTable New()
{
return new FluentTable();
}
}
Now you can use it as follows:
FluentTable tbl = FluentTable
.New()
.addTableCellwithCheckbox("chkIsStudent", true, false)
.addTableCellwithTextbox("tbStudentName", false);
This should give you a general idea of โโhow you need to do this. See the free interface on wikipedia .
:
interface IFluentTable
{
IFluentTable addTableCellwithCheckbox(string chk, bool isUnchecked,
bool isWithoutLabel)
IFluentTable addTableCellwithTextbox(string name, bool isEditable)
}
: class FluentTable : IFluentTable {}