c# byte数组截取
时间: 2023-10-25 09:03:49 浏览: 275
在C#中,可以使用不同的方法来截取byte数组。方法一是使用BitConverter.ToInt16和BitConverter.ToInt64来截取指定长度的字节数组。例如,可以使用BitConverter.ToInt16(bt, 2)来截取从第2位开始的2个字节,使用BitConverter.ToInt64(bt, 4)来截取从第4位开始的8个字节。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [C# 字节数组截取](https://blog.csdn.net/qq_30725967/article/details/88350298)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [C#从字节数组截取片段(转载)](https://blog.csdn.net/smebkoo70/article/details/127209100)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文