Search Results

Search found 2 results on 1 pages for 'user299990'.

Page 1/1 | 1 

  • Which Activator.CreateInstance overload function to call?

    - by user299990
    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!!

    Read the article

  • What version of .NET containing RuntimeMethodHandle.EmptyHandle?

    - by user299990
    No one answers my question in http://stackoverflow.com/questions/1295344/difference-between-activator-createinstance-and-typeoft-invokemember-with-b/2500960#2500960. I guess that the issue is closed and I am asking here again. Ben M have a nice function which I need for a project. The function is - public static T CreateInstance() { bool bNeedSecurityCheck = true; bool canBeCached = false; RuntimeMethodHandle emptyHandle = RuntimeMethodHandle.EmptyHandle; return (T) RuntimeTypeHandle.CreateInstance(typeof(T) as RuntimeType, true, true, ref canBeCached, ref emptyHandle, ref bNeedSecurityCheck); } I am using .NET 3.5 and Visual studio 2008. It gives the error "EmptyHandle type name does not exist in the type System.RuntimeMethodHandle". Then I used "RuntimeMethodHandle emptyHandle = new RuntimeMethodHandle();". Another error presents. RuntimeTypeHandle does not have a CreateInstance method either. Activator has. But it does not take any ref parameter. Thanks for clarification in advance!

    Read the article

1