Hi,
I have a main class ClassA
. From it there are two subclasses ClassB
and ClassC
. Each of these subclasses has different constructors.
Now there is ClassTest
with a Fill As ClassA
property.
How can I shorten the previous assignment from this code (MyPicture = Picture)
Var instance As New ClassTest
instance.Fill = New ClassB(Color.Red)
' or
' instance.Fill = New ClassC(MyPicture)
to this notation using Operator_Convert
?
Var instance As New ClassTest
instance.Fill = Color.Red
' or
' instance.Fill = MyPicture
So far I get a syntax error. Maybe @Kem_Tekinay?