Sven Groot wrote:

Smells of a VB coder to me, there it would be "TypeOf other Is TIAoServiceDetail".

In C# you need to do "other.GetType() == typeof(TIAoServiceDetail)". But littleguru is right; using "as" (TryCast in VB) is faster since it avoids the extra cast.


I'd rather not be called a VB coder Wink

I prefer C# by far... I've just had my hands dirty for too long. I can't write proper C# code out of my head any longer [C]

But let's leave it at that, i believe the original poster got his question answered in depth. Smiley