I am converting a codeblock from C# to VB.NET using the http://www.developerfusion.com/tools/convert/csharp-to-vb/
All is going well except for one line which I cannot figure how to convert:
C# source
result.DrawPolyline(Array.ConvertAll<PointF, Point>(pts, Point.Round), true, new Bgr(Color.Red), 5);
Using the converter gives this
result.DrawPolyline(Array.ConvertAll(Of PointF, Point)(pts, Point.Round), True, New Bgr(Color.Red), 5)
The error in the above line is:
Argument not specified for parameter ‘value’ of ‘Public Shared
Function Round(value As System.Drawing.PointF) As
System.Drawing.Point’.
This should convert an Array of PointF to Point:
You need to pass the
PointFto Point.Round.Tested with:
It would also work if you would pass the delegate to
Point.Roundas @Jon has mentioned: