如何在vb.net10中将值从字符串数组复制到字节数组 [英] how to copy value from string array to byte array in vb.net10

查看:256
本文介绍了如何在vb.net10中将值从字符串数组复制到字节数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将值从字符串数组复制到vb.net10中的字节数组

解决方案

您没有提供代码示例,所以我假设您的意思是字符串数据类型为字节数组数据类型。如果这不是您想要的,请使用上面的改善问题链接并提供一些示例代码。



我通过Google找到答案。



如何:在Visual中将字符串转换为字节数组 [ ^ ]





 私人 函数 UnicodeStringToBytes(
ByVal str As 字符串作为 字节()

返回 System.Text.Encoding.Unicode.GetBytes(str)
结束 功能


how to copy value from string array to byte array in vb.net10

解决方案

You did not provide a code sample, so I assumed that you meant a String data type to a Byte Array data type. If this is not what you wanted, please use "Improve Question" link above and provide some sample code.

I found the answer via Google.

How to: Convert Strings into an Array of Bytes in Visual[^]


Private Function UnicodeStringToBytes(
    ByVal str As String) As Byte()

    Return System.Text.Encoding.Unicode.GetBytes(str)
End Function


这篇关于如何在vb.net10中将值从字符串数组复制到字节数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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