How do I ask an instance of a Type what Type it is?
Example.
I have a Vehicle Type that is extended by Bus and Car.
In a method that accepts Vehicle as a param, I would like to do different things based on the "type" of the Vehicle.. (ie. if it's a Bus do this, if it's a Car do that)
In java I would use "<var> instanceOf <type>"...
:o)
Brucey
Example.
I have a Vehicle Type that is extended by Bus and Car.
In a method that accepts Vehicle as a param, I would like to do different things based on the "type" of the Vehicle.. (ie. if it's a Bus do this, if it's a Car do that)
In java I would use "<var> instanceOf <type>"...
:o)
Brucey