I came from C# background now im trying to write on VB NET.
I wrote a few rows in VB NET:
For Xcor = 0 To bmp.Width Step (bmp.Width / 10)
For Ycor = 0 To Ycor <= bmp.Height Step 1
pixelColor = bmp.GetPixel(Xcor, Ycor)
hue = pixelColor.GetHue()
saturation = pixelColor.GetSaturation()
If ((hue > hueMin) AndAlso (hue < hueMax)) Then
bmp.SetPixel(Xcor, Ycor, Color.Black)
End If
Next
Next
In this row i get:
For Ycor = 0 To Ycor <= bmp.Height Step 1
this error:
Type of ‘Ycor’ cannot be inferred from an expression containing ‘Ycor’.
Any idea how to fix the code?
Thank you in advance.
I think you just meant:
Or equivalently, as per comments:
VB
Forloops specify their bounds, not conditions. (Look at yourXcorloop, for example.)