Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将一些 C# 转换为 VB。调用此方法:
public static void WriteLineA(Stream Stream, byte[] Line);
C# 调用如下所示:
SBASUtils.__Global.WriteLineA(messageStream, new byte[0]);
所有 C# > VB 转换器将字节转换为:
New Byte(-1) {}
编译器不喜欢这样。任何帮助,将不胜感激。
谢谢!
尝试这个:
SBASUtils.__Global.WriteLineA(messageStream, New Byte() {})
这将创建一个新的字节数组,其大小自动调整为大括号之间的元素数。由于括号之间没有项目,它将创建一个空(零项目)数组。