您的位置:程序门 -> vb -> 基础类



这句c#怎么转换成vb语言


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


这句c#怎么转换成vb语言
发表于:2007-05-30 15:12:31 楼主
objedz.name   =   system.text.unicodeencoding.unicode.getstring(bt,   0,   30).trim();
发表于:2007-05-30 18:53:341楼 得分:0
是要把数组转换成字符串吧
objedz.name   =   strconv(bt,   vbunicode)
发表于:2007-05-30 18:56:092楼 得分:0
举个例子吧

'将字符串转换为字节数组
dim   a()   as   byte
a   =   strconv( "测试字符串 ",   vbfromunicode)
'验证一下
dim   i   as   integer
for   i   =   lbound(a)   to   ubound(a)
        debug.print   a(i)
next
'再把字节数组转换回来
dim   ret   as   string
ret   =   strconv(a,   vbunicode)
debug.print   ret


运行结果
  178  
  226  
  202  
  212  
  215  
  214  
  183  
  251  
  180  
  174  
测试字符串


快速检索

最新资讯
热门点击