I've tried CreateObject and it does not work in C#. So i tried:

Type t = Type.GetTypeFromProgID("MyObject.Class1");
Object o = Activator.CreateInstance(t);

This works to the point where it compiles and runs. However, when I try to use one of MyObject's methods, it gives me an error:

'object' does not contain a definition for 'MyFunction'

Any ideas on how to do this correctly?