* "Amin Sobati" <am***@morva.net> scripsit:
But if I need access to Class1 members, I can write:
Dim MyObj as Class1 = New Class1
What's the usage for being able to write:
Dim MyObj as Class1 = New Class2
The line above does not make much sense. Assume you write a class
library that contains a class with a 'Foo' method:
\\\
Public Sub Foo(ByVall Goo As Class1)
...
End Sub
///
When writing this class/method, you don't know which subclasses 'Class1'
will have. The user of the class library can now pass instances of any
subclasses of 'Class1' to the method.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>