Use an interface...call it iHuman :) and have each class implement it.
The interface needs to define the structure that your function needs on
each class.

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff Paulsen
Sent: Monday, August 20, 2007 7:17 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [ADVANCED-DOTNET] Generics as parameters? syntax question

I have classes like this:

Class Customer
  Inherits Person
Class Employee
  Inherits Person

Class PersonCollection(Of T as {Person, New})

Class EmployeeCollection
  Inherits MyCollection(of Employee)
Class CustomerCollection
  Inherits MyCollection(of Customer)

Now I want to have a function that can operate on any MyCollection. How
can
I declare that?

Thanks in advance,

Jeff Paulsen

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to