开发者

c# - how to copy a section of "byte[]" to another array? [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

How to copy part of an array to another array in C#

c# - how to copy a section of "b开发者_C百科yte[]" variable to another array?


how about something like:

var byteArray = new byte[] { 1, 0, 1 };
var startIndex = 1;
var length = 2;

byteArray.Skip(startIndex).Take(length).ToArray();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜