| re: Value of type 'Integer' cannot be converted
"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> wrote
in message news:eEvenH%23BFHA.244@TK2MSFTNGP10.phx.gbl...[color=blue]
>
> "Compiler Error Message: BC30311: Value of type 'Integer' cannot be
> converted to 'ASP.multiclasses_aspx.VehicleKey'."
>
> It is expecting a VehicleKey type of object. You can not send in an
> Interger when it expects a VehicleKey type.
>
> From what your code looks like you could do something like:
> Line 108: DodgeCar.Ignition(new VehicleKey(789))
>
> Or since you defined did: "Dim PlymouthKey As New VehicleKey(789)" you
> could just pass in PlymouthKey
> Line 108: DodgeCar.Ignition(PlymouthKey)
>
>
> Make sure you turn "Option Strict On" This will help you figure these
> errors out at design time.
>
> Hope this helps
> Chris
>[/color]
--------SNIP-----------
That was exactly what I needed to know. Actually, it was similar in the book
and somehow along the way I must of stopped paying attention to what I was
doing.
Thanks Chris.
Jim |