c# instanceof
July 31st, 2008 | by programming |Is there “c# instanceof”?
It’s commonly used in Java. In C# you can use “is” or “as” instead.
if (object is String) will return true if the supplied object is a String.
(object as String) is just another way of casting object to a String.