开发者

Getting four bytes from a byte array in VB.NET

I have a byte array, and I need to get four bytes from it at a certain location (16), but I don't want to convert it to an integer开发者_开发问答 or anything. Just keep it as four bytes to store in a variable.


If you have say:

byte[] source; // source array
byte[] dest=new byte[4];

Then you'd copy 4 bytes from source starting at 16 to dest like this:

Array.Copy(source, 16, dest, 0, 4);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜