开发者

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

开发者 https://www.devze.com 2023-01-12 08:14 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: How to copy part of an array to another array in C#
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

精彩评论

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