从较大的字节[]读取int [英] Read int from bigger byte[]

查看:65
本文介绍了从较大的字节[]读取int的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Codeproject,



我的缓冲区大小为4096.



( byte [] NewInt = new byte [4096])



Int写在NewInt中,但显然int不是4096字节长。如何让C#知道例如int在第7个字节停止?

Hello Codeproject,

I have a buffer that is the size of 4096.

(byte[] NewInt = new byte[4096])

The Int is written inside the NewInt, but obviously, the int is not 4096 bytes long. How would I make C# know that for instance the int stops at the 7th byte?

推荐答案

你看过阵列结构 [ ^ ]


这篇关于从较大的字节[]读取int的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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