Solved

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

Posted on 2011-03-18
6
192 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:Silas2
  • 4
6 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 200 total points
ID: 35168032
Right-click the brace and select "Set Next Statement".
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35168044
You right-click on the for instead and choose set next statement.
0
 
LVL 51

Assisted Solution

by:HainKurt
HainKurt earned 50 total points
ID: 35168145
or put a dummy statement :)

for ...{
  offending line
  i int = 0;  // you can jump to this line
}
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 200 total points
ID: 35168153
@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
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 200 total points
ID: 35168171
>>  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
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 200 total points
ID: 35168314
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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
About delegates in c sharp 3 47
Exit the loop 4 42
Reset asp.net login password 4 42
Call windows 10 virtual keyboard from windows forms app 2 32
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now