CastException Summary Represents a failed runtime type cast. Description Represents a failed runtime type cast. Examples Example of how this exception might be encountered 12345678910111213import System;import System.Exceptions; class Foo {}class Bar : Foo {} try { Foo foo = new Foo(); (Bar) foo;}catch(CastException e) { Console.error(e);} Methods CastException (Constructor)Constructs a System.Exceptions.CastException object. Share HTML | BBCode | Direct Link