I am looking to convert some VB6/COM+ code to C#/COM+
However where in VB6 or VB.NET I have:
Dim objAdmin
objAdmin = Server.CreateObject("AppAdmin.GUI")
objAdmin.ShowPortal()
In C# it seems like I have to do the following:
object objAdmin = null;
System.Type objAdminType = System.Type.GetTypeFromProgID("AppAdmin.GUI");
m_objAdmin = System.Activator.CreateInstance(objAdminType);
objAdminType.InvokeMember("ShowPortal", System.Reflection.BindingFlags.InvokeMethod, null, objAdmin, null);
Is there a way of getting c# to not have to use the InvokeMember function and just call the function directly?