Home All Groups Group Topic Archive Search About

Generics and Interfaces

Author
30 Mar 2006 5:03 PM
moondaddy
VS 2005 VB/C#

I want to create an interface for my business objects and one of the methods
I want to include in the interface is my LoadDataRow method which I use in
every business class representing an entitity.  An example of this method
is:

Public Overloads Sub LoadDataRow(ByVal dr As wsEquip.dsEquip.tbEquipRow)
    Try
        Call LoadData(dr)
    Catch ex As Exception
        ErrLog(ex)
    End Try
End Sub

Where 'wsEquip.dsEquip' is a strongly typed dataset.

Each differenent busness class implementing this interface will use a
different strongly typed dataset.  Therefore, is it possible to use Generics
somehow so this method could be implemented from the interface and
'wsEquip.dsEquip.tbEquipRow' would be defined when I finish coding the
method?

Thanks.





--
moondaddy@nospam.nospam

AddThis Social Bookmark Button