【发布时间】:2012-02-03 09:29:59
【问题描述】:
我正在使用 http://www.developerfusion.com/tools/convert/csharp-to-vb/ 将代码块从 C# 转换为 VB.NET
除了一行我不知道如何转换之外,一切都很顺利:
C# 源代码
result.DrawPolyline(Array.ConvertAll<PointF, Point>(pts, Point.Round), true, new Bgr(Color.Red), 5);
使用转换器可以做到这一点
result.DrawPolyline(Array.ConvertAll(Of PointF, Point)(pts, Point.Round), True, New Bgr(Color.Red), 5)
上面一行的错误是:
未为“公共共享”的参数“值”指定参数 函数 Round(value As System.Drawing.PointF) As System.Drawing.Point'。
【问题讨论】:
-
也许 VB.Net 认为 Point.Round 是一个函数而不是枚举的值,因此会询问您一个参数。当您在
(pts,之后键入Point.时,您的智能感知(或相同)会发生什么?
标签: c# vb.net c#-to-vb.net