将一些逻辑运算符从CS转换为VB [英] convert some logical operators from cs to vb

查看:147
本文介绍了将一些逻辑运算符从CS转换为VB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将cs中的这一行转换为vb,我知道这是一个逻辑运算符

据我所知,这就是我解释以下cs代码的方式

I''m trying to convert this line in cs to vb, I understand it''s a logical operator

To the best of my understanding, this is how I interpreted the cs code below

converted += (newByteArray[i] & 0x80) > 0 ? "1" : "0";



我对vb的最佳猜测



my best guess in vb

converted += if newByteArray[i] & &h80 = 0 then "1" or else "10"

推荐答案

已转换+ = If(((newByteArray(i)和&H80)> 0,"1","0")
converted += If((newByteArray(i) And &H80) > 0, "1", "0")


您可以尝试以下方法:
转换后的+ = if(newByteArray [i] AND&h80)则为"1",否则为"10"

我不确定这将如何测试px计数.使用"AND"代替&"

-rwg
you could try this:
converted += if ( newByteArray[i] AND &h80 ) then "1" or else "10"

I''m not sure how this will test for px count. Use "AND" instead of "&"

-rwg


这篇关于将一些逻辑运算符从CS转换为VB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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