缓冲区应对问题. [英] Buffer coping question .

查看:109
本文介绍了缓冲区应对问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将数据从一个大字节数组复制到另一字节的最有效方法是什么?

Whats the most efficient way to copy data from one large byte array to another?

推荐答案

它是System.Array.CopyTo,另请参见System.Array.Clone精确的克隆.

-SA
It''s System.Array.CopyTo, see also System.Array.Clone for exact clone.

—SA


除了SA的解决方案之外,总是有Buffer.BlockCopy [ ^ ]-不确定它是否更有效率,但
In addition to SA''s solution, there is always Buffer.BlockCopy[^] - not sure if it''s any more efficient but this SO thread[^] indicates it may be.


这篇关于缓冲区应对问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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