>Hi,
>
>I have a method that needs to return either OleDbDataReader or SqlDataReader (depends on the back-end database). Within the method I have IF/ELSE where the code is processed accordingly. But in the method signature I can only specify one type of reader. E.g.
>
>public OleDbDataReader MethodName()
>or
>public SqlDataReader MethodName()
>
>
>Does it mean that I have to split the method into two methods depending on the type of reader I need to return and deal with it at the calling level?
>
>TIA.
Sounds like the perfect spot for a generic.