Wcf Type.GetType(“System.ServiceModel.BasicHttpBinding”返回null
我想知道为什么我需要传递AssemblyQualifiedName来创建基本http绑定的任何实例。我在ServiceModel.EndPointAddress中看到了相同的行为 当我传递程序集名称时,它返回null string binding=“System.ServiceModel.BasicHttpBinding”; Type.GetType(binding);//返回null 如果我通过了AssemblyQualifiedName,它工作正常 string binding=“System.ServiceModel.BasicHttpBinding,System.ServiceModel,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a561934e089”;Wcf Type.GetType(“System.ServiceModel.BasicHttpBinding”返回null,wcf,reflection,basichttpbinding,gettype,Wcf,Reflection,Basichttpbinding,Gettype,我想知道为什么我需要传递AssemblyQualifiedName来创建基本http绑定的任何实例。我在ServiceModel.EndPointAddress中看到了相同的行为 当我传递程序集名称时,它返回null string binding=“System.ServiceModel.BasicHttpBinding”; Type.GetType(binding);//返回null 如果我通过了AssemblyQualifiedName,它工作正常 string binding=“Syste
GetType(binding);返回对象,这就是
GetType
被记录为使用的对象,除非该类型是核心类型,或者是当前正在执行的程序集
参数
字体名
类型:System.String
要获取的类型的程序集限定名。请参阅
AssemblyQualifiedName。如果类型位于当前正在执行的
在Mscorlib.dll中,提供类型名就足够了
由其命名空间限定