Solved

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

Posted on 2011-03-18
6
190 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 74

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 74

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 74

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 74

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

11 Experts available now in Live!

Get 1:1 Help Now