将Byte []转换为自定义类型 [英] Converting Byte[] to custom type

查看:90
本文介绍了将Byte []转换为自定义类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何将Byte []转换为自定义类型.
请建议我.


Subash.

Hi,

How to convert Byte[] to custom type.
Pls suggest me.


Subash.

推荐答案

[ ^ ]会帮助您快速进行操作.
THIS[^] would help you quick.


如果这是原始类型,则为System.BitConverter: http://msdn .microsoft.com/en-us/library/system.bitconverter.aspx [ ^ ]

对于用户定义的类,可以使用不同的方法对其进行序列化.您可以按字段进行转换,也可以使用二进制序列化器.
If this is a primitive type, it''s a System.BitConverter: http://msdn.microsoft.com/en-us/library/system.bitconverter.aspx[^]

For user-defined class it can be serialized if different ways. You can convert on per-field basis or use binary serializer.


这篇关于将Byte []转换为自定义类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆