Generics and Derived Classes .NET 3.5
- by Achilles
Consider the following where class "Circle" inherits from "Shape":
dim objListOfCircles as new List(of Circle)
DrawShapes(objListOfCirlces)
Private sub DrawShapes(byref objListOfShapes as List(of Shape))
for each objShape as Shape in objListOfShapes
objShape.Draw()
next
end sub
I can't get this to work. What is the explaination as to…