![tiny os虚拟机](https://i-blog.csdnimg.cn/blog_migrate/ec4d5446e698a4dfe2bfd1078c5f843a.png)
tiny os虚拟机
Top subtle (as a brick in the face) issues when converting my Tiny OS from C# to VB.NET:
将Tiny OS从C#转换为VB.NET时,最细微的问题(表面上是一块砖):
Array Lengths...I knew we were warned, and there were all those arguments from Beta1 to Beta2 to RTM, but still... byte[] bytes = new byte[4];has length 4, from 0 to 3
Array Lengths...I knew we were warned, and there were all those arguments from Beta1 to Beta2 to RTM, but still... byte[] bytes = new byte[4];has length 4, from 0 to 3
Array Lengths...I knew we were warned, and there were all those arguments from Beta1 to Beta2 to RTM, but still... byte[] bytes = new byte[4];has length 4, from 0 to 3 Dim bytes(4) As Bytehas length 5, from 0 to 4
-
数组长度...我知道我们被警告过,从Beta1到Beta2再到RTM都有所有这些参数,但仍然...
字节[]字节=新 字节[4]; 长度为4,从0到3数组长度...我知道我们被警告过,从Beta1到Beta2再到RTM都有所有这些参数,但是仍然...
字节[]字节=新 字节[4]; 长度为4,从0到3数组长度...我知道我们被警告过,从Beta1到Beta2再到RTM都有所有这些参数,但仍然...
字节[]字节=新 字节[4]; 长度为4,从0到3个Dim字节(4)为 字节长度为5,从0到4 Integer Divison... "/" and "\" are different operators in VB.NET than C#. "/" doesn't round, while "\" does...
整数除法... VB.NET中的“ /”和“ \”是与C#不同的运算符。 “ /”不取整,而“ \”不取整...
Integer Divison... "/" and "\" are different operators in VB.NET than C#. "/" doesn't round, while "\" does...
整数除法... VB.NET中的“ /”和“ \”是与C#不同的运算符。 “ /”不取整,而“ \”不取整...
(uint)(boundary * ((number / boundary) + ((number % boundary > 0) ? 1: 0)))where boundary is 16 and number is 82 returns 96. While "equivalent (not)" VB.NET CType(boundary * ((number / boundary) + IIf(number Mod boundary > 0, 1, 0)), Integer)where boundary is 16 and number is 82 returns 98 because (number / boundary) returns 5.25, not 5. This was fixed by using a backslash. CType(boundary * ((number \ (BACKSLASH) boundary) + IIf(number Mod boundary > 0, 1, 0)), Integer)This is one of these obvious, silly things you've known since VB3, but you don't think about it when converting from C# to VB.NET.
( uint )(boundary *(((数字/边界)+((数字%边界> 0)?1:0)))其中边界为16且数字为82的返回96。而“等效(非)” VB.NET CType (boundary *(((number / boundary)+ IIf(number Mod boundary> 0,1,0 )), Integer )) ,boundary为16而number为82则返回98,因为(number / boundary) 返回5.25,而不是5。使用反斜杠可以解决此问题。 CType (边界*((数字((BACKSLASH)边界)+ IIf(数字Mod边界> 0,1,0) ),整数)这是自VB3以来您就知道的这些显而易见的愚蠢的事情之一,但您没有从C#转换为VB.NET时不要考虑它。
UInt32 isn't supported in VB, so I had to wimp out and switch to Integers.
在VB中不支持UInt32,因此我不得不精疲力竭并切换到Integers。
tiny os虚拟机