I have a utility class that takes a generic list as a parameter.
Code looks like:
Function DoStuff(collection as Object, elt as Object)
...
collection.Add(elt)
...
End Function
This is called with:
DoStuff( List(Of Foo), new Foo() )
DoStuff( List(Of Bar), new Bar() )
There are about a dozen different types.
Currently, passing as Object results in a Late bound resolution warning, although it runs fine.
I've tried different ways to pass in collection and elt (Foo and Bar both extend a base class) but can't seem to figure out the "proper" way to do it.
Ideas?