Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8389353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:42:15+00:00 2026-06-09T18:42:15+00:00

I came from C# background now im trying to write on VB NET. I

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:42:17+00:00Added an answer on June 9, 2026 at 6:42 pm

    I think you just meant:

    For Ycor = 0 To bmp.Height Step 1
    

    Or equivalently, as per comments:

    For Ycor = 0 To bmp.Height
    

    VB For loops specify their bounds, not conditions. (Look at your Xcor loop, for example.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I came from PHP language(codeigniter), but now I learning ASP.Net MVC :) In PHP
I came from non-computer-science background and Now I am working as a Ruby on
Background I came from several years working in a company where all the database
I came from a Windows background whern it comes to development environments. I'm used
As someone who came from Java background and being a newbie to Ruby, I
I'm new to Ruby - came from Java background. I want to use third
I came from Java Swing background. I am interested to have my own portfolio
Coming from a Java/C# background, the MEL site came as a bit of a
Background I have a Crystal Reports 2008 file that came my way from a
Background From the valuable advice I received here I have now moved all of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.