what language?
you should be able to use object.Type to get the type constant.
If you are trying to execute different code depending on what type of object you have, then a slick way to do this is to create a map (or associative container, I don't know exactly what they call it in C#). For the key use the Microsoft.VisualBasic.Information.TypeName(...) function (this returns a string), and for the value store a functor. Then you can loop thru the objects and grab the appropriate functor out of the map. This avoids having a huge, slow, "if...then...elseif...else" branching statement.
Although, if you only have to handle a few object types, then this may be more overhead than is required.