Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public MustInherit Class BaseAbstractClass(Of T As WebControl)
- Inherits WebControl
- Protected _item As T
- Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
- _item.RenderControl(writer)
- End Sub
- End Class
- Public Class ConcreteWrapper1
- Inherits BaseAbstractClass(Of CustomControlInheritedFromWebControl1)
- Public Sub New(ByVal control As CustomControlInheritedFromWebControl1)
- MyBase._item = control
- End Sub
- End Class
- Public Class CustomControlInheritedFromWebControl1
- Inherits WebControl
- //not the correct comment markers but the coloring works better
- //do stuff here... Implm not important.
- End Class
- Public Class WebControlFactory
- Public Shared Function GetWebControl() As BaseAbstractClass(Of WebControl)
- Return New ConcreteWrapper1(New CustomControlInheritedFromWebControl1())
- End Function
- End Class
- WebControl
- BAC inherits WebControl
- BAC(of T) inherits BAC
- Wrapper1 inherits BAC(of int)
- Wrapper2 inherits BAC(of string)
- Wrapper3 inherits BAC(of Foo)
- Wrapper4 inherits BAC(of Bar)
Add Comment
Please, Sign In to add comment