Which Activator.CreateInstance overload function to call?

Posted by user299990 on Stack Overflow See other posts from Stack Overflow or by user299990
Published on 2010-03-24T20:17:50Z Indexed on 2010/03/24 20:23 UTC
Read the original article Hit count: 346

Filed under:

Which Activator.CreateInstance overload function to call? I have a type returned from "Type proxyType = GetProxyType(contractType);" and the constructorinfo is

"[System.Reflection.RuntimeConstructorInfo] = {Void .ctor(System.ServiceModel.InstanceContext)} base {System.Reflection.MemberInfo} = {Void .ctor(System.ServiceModel.InstanceContext)}

[System.Reflection.RuntimeConstructorInfo] = {Void .ctor(System.ServiceModel.InstanceContext, System.String)} base {System.Reflection.MethodBase} = {Void .ctor(System.ServiceModel.InstanceContext, System.String)}

[System.Reflection.RuntimeConstructorInfo] = {Void .ctor(System.ServiceModel.InstanceContext, System.String, System.String)} base {System.Reflection.MethodBase} = {Void .ctor(System.ServiceModel.InstanceContext, System.String, System.String)}

[System.Reflection.RuntimeConstructorInfo] = {Void .ctor(System.ServiceModel.InstanceContext, System.String, System.ServiceModel.EndpointAddress)} base {System.Reflection.MethodBase} = {Void .ctor(System.ServiceModel.InstanceContext, System.String, System.ServiceModel.EndpointAddress)}

[System.Reflection.RuntimeConstructorInfo] = {Void .ctor(System.ServiceModel.InstanceContext, System.ServiceModel.Channels.Binding, System.ServiceModel.EndpointAddress)} base {System.Reflection.MethodBase} = {Void .ctor(System.ServiceModel.InstanceContext, System.ServiceModel.Channels.Binding, System.ServiceModel.EndpointAddress)}.

Thanks!!

© Stack Overflow or respective owner

Related posts about c#3.0