hprose / hprose-dotnet

Hprose 3.0 for .NET
MIT License
383 stars 98 forks source link

泛型的序列化反序列化问题 #83

Open superaccount opened 2 years ago

superaccount commented 2 years ago

当服务端与客户端存在一个声明如下的类型时 class Item { public T Value {get;set;} } 由服务端序列化一个Item source = new Item();对象并传输至客户端 客户端反序列化时生成的类型限定名称为Item.1.System.String 导致客户端无法从程序集中根据名称创建类型

andot commented 2 years ago

你是说泛型吗?泛型类型不能直接作为参数或返回结果类型,只能用泛型的实例化类型才行。