Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
superaccount opened this issue May 20, 2022 · 1 comment
Open

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

superaccount opened this issue May 20, 2022 · 1 comment

Comments

@superaccount
Copy link

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

@andot
Copy link
Member

andot commented Jun 16, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants