本文介绍了在VB.Net中将字节数组转换为短裤(Int16)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Vb.net中将字节数组转换为短值数组?请注意,我想从给定的字节数组中读取每组2个字节值作为单个short值.请提出建议.
请注意,我需要从包含wav样本作为字节值(例如255、255、0、2等)的文本文件中写入wav文件. >使用此:
Dim 字节 As Byte () 暗短裤= Array.ConvertAll(bytes,功能(b) CShort (b))
How do I convert a Byte Array into an array of short values in Vb.net? Note that I want to read each set of 2 byte values from the given byte array as a single short value. Please suggest.
Note that I need this for writing wav file from a textfile that contains wav samples as byte values (such as 255, 255, 0, 2, etc.).
解决方案
这篇关于在VB.Net中将字节数组转换为短裤(Int16)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!