If you take an object of unknown type and tryto cast it to the desired type, then it is the sameas C#'s () cast:VB:Dim o As Object = SomeObject()Dim i As Integer = DirectCast(o, Integer)C#:object o = SomeObject();int i = (int)o;

This is because, if o is typed as a System.Object,then the () operation in C# will attempt to unboxit. This will fail if the types don't match exactly;for instance, if o is a boxed System.Double, then (int)o will throw an exception because o must be unboxed as a System.Double before it can beconverted to a System.Int32