VB->C# Conversion Qustion - For...Next

I can't get my head round this, in VB, in debug/step thru mode, when you have a For...Next statement and you have a bad line of code in the middle, but you want to jump to the next one in the loop/iteration,  you can right-click on the 'Next' word as it is an executable statement and go Set Next Statement and you get to go to the next item, but in C# I just have a closing brace and the debugger won't accept it as a executable line of code, I end up stopping the whole exeuction and putting a bogus line of code in so I can jump to that.
What is the correct way of doing this?
Silas2Asked:
Who is Participating?
 
käµfm³d 👽Connect With a Mentor Commented:
Right-click the brace and select "Set Next Statement".
0
 
Carl TawnSystems and Integration DeveloperCommented:
You right-click on the for instead and choose set next statement.
0
 
HainKurtConnect With a Mentor Sr. System AnalystCommented:
or put a dummy statement :)

for ...{
  offending line
  i int = 0;  // you can jump to this line
}
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
käµfm³d 👽Connect With a Mentor Commented:
@carl_tawn

In my test, that causes the same "iteration" to be run (i.e. the variable is never incremented). Right-clicking the increment operation does seem to work appropriately.
0
 
käµfm³d 👽Connect With a Mentor Commented:
>>  or put a dummy statement :)

But if you are working in 64-bit you would have to have done this before executing the app since 64-bit doesn't currently allow "break-and-edit"...  unless they've come out with an update.
0
 
käµfm³d 👽Connect With a Mentor Commented:
Alternatively, you can drag the yellow arrow to the line you want to execute next.

For whatever reason, I still can get Screencast to successfully upload, so for now I'll use EE-Stuff. Following is a video clip of my first comment.

    https://filedb.experts-exchange.com/incoming/ee-stuff/8073-test.avi 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.