Determining the type of object returned via a sensor or other detection event (eg collision, etc) in LSL is done via llDetectedType() – this returns a bitflags containing whether the object is an avatar, prim, etc.
Under MRM, the same is achieved by using the C# keyword “is”. In C# this returns true if the object is a specific type, or implements the interface ‘type’; because of this it means that we can determine what an IEntity is by looking for the inherited classes.
For example:
In this example, e.Sender is defined to be an IEntity – which can mean an Object or an Avatar presently (there may be other types of entity potentially later on). You can determine exactly what type of entity using “is IObject” or “is IAvatar”, and if it returns true, you can typecast to those interfaces safely.

