The following example overrides the AppendSubBuilder method to throw an Exception if the control this control builder is applied to tries to include controls in its instance of ControlCollection class.
// Override the AppendSubBuilder method to throw an// exception if the class it is applied to attempts// to include child controls. publicoverridevoid AppendSubBuilder(ControlBuilder subBuilder)
"A custom label control cannot contain other objects.");