vb.net 中 float[] 的等效数据类型是什么?

Uro*_*osa 5 c# vb.net type-conversion

以下代码的 vb.net 等效语句是什么?

`float[] widths = new float[] { 1f, 1f, 1f };` 
Run Code Online (Sandbox Code Playgroud)

小智 6

这里,也可以用后缀float表示:SingleF

Dim widths As Single() = {1.0F, 1.0F, 1.0F}
Run Code Online (Sandbox Code Playgroud)

参考:如何:在 Visual Basic 中初始化数组变量


Cro*_*oll 5

floatSingle在 Visual Basic 中通过名称访问的类型。float仅是 Visual C# 关键字。

定义一个数组System.Single