Public Overrides Sub AddGridColumns()
Try
'Copy and delete columns
Me.iLeuUltraGrid.AssignColumnStyle("Copy", "", 0, , _ LEU.Controls.ExtInfragistics.LEUUltraGrid.LEUColumnStyleEnum.Image, _ LEU.Controls.ExtInfragistics.LEUUltraGrid.LEUDynamicEnum.DefaultFalse _
, , , , , , , , , , , , , , "GRID_IMAGE_COPY", False)
Me.iLeuUltraGrid.AssignColumnStyle("Delete", "", 1, , _
LEU.Controls.ExtInfragistics.LEUUltraGrid.LEUColumnStyleEnum.Image, _
LEU.Controls.ExtInfragistics.LEUUltraGrid.LEUDynamicEnum.DefaultFalse _
, , , , , , , , , , , , , , "GRID_IMAGE_DELETE", False)
MyBase.AddGridColumns()
答案 0 :(得分:0)
MyBase提供了一种引用当前实例的基类的方法,因此在此示例中,它调用在基类中重写的AddGridColumns方法。如果删除MyBase,那么对AddGridColumns的调用将是当前实例中的调用,并且会在被抛出StackOverflowException之前递归调用它。
请注意,您可能没有看到StackOverflowException,因为这是在try块中抛出的,您可能正在处理异常。