[英]java to vb.net - linkedlist to arraylist
I am converting java code to vb.net and this line of code gives me different output in enclipse than one in VS. 我正在将Java代码转换为vb.net,这行代码在enclipse中给了我与在VS中不同的输出。
req1.set(req3, Integer.valueOf(((Integer)req1.get(req3)).intValue() ^ ((Integer)req6.get(req3 + 256)).intValue() & 0x1));
System.out.println(req1.get(req3));
where req1
is linkedlist, req3
is int, and req6
is linkedlist 其中
req1
是链表, req3
是int, req6
是链表
and here is my vb.net snippet 这是我的vb.net片段
req1(req3) = (req1(req3) Xor req6(req3 + 256) & &H1)
ListBox1.Items.Add(req1(req3))
where req1
is arraylist req3
is integer req6
is arraylist 其中
req1
是arraylist req3
是整数req6
是arraylist
output in eclipse (Correct One) 在日食中输出(正确的一个)
1 1个
0 0
0 0
1 1个
output in VS (Incorrect One) VS中的输出(不正确的一个)
60 60
661 661
970 970
411 411
All the code before this works perfectly in both IDEs. 之前的所有代码都可以在两个IDE中完美运行。
I fixed it finally thanks everyone. 我终于解决了,谢谢大家。 I had to use "And" keyword inseatd of & sign
我必须使用带有&符号的“ And”关键字
req1(req3) Xor req6(req3 + 256) And &H1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.