string myString = "Hello World"; bool result = myString is Object; // true
interface IMyInterface { } class MyClass : IMyInterface { } MyClass myClass = new MyClass(); bool result = myClass is IMyInterface; // true
StringBuilder sb = new StringBuilder("Hello"); bool result = sb is StringBuilder; // trueThe System IsInstanceOfType method is part of the .NET Framework Class Library.