Need common type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cethie
    New Member
    • Jan 2010
    • 6

    Need common type

    I need a function to return something that can either be
    Code:
    System.Windows.Controls.Control
    or
    Code:
    System.Windows.Controls.StackPanel
    .

    Ideally it should be an interface thats implemented by both or a baseclass of both of them (I hate using object for this purpose)

    The likes of UIElement etc seem to be exclusive to one of 'em only.

    Any ideas?
  • nbiswas
    New Member
    • May 2009
    • 149

    #2
    How about using an adapter design pattern ?

    Comment

    Working...