Solved

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

Posted on 2011-03-18
6
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 55

Assisted Solution

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

for ...{
  offending line
  i int = 0;  // you can jump to this line
}
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 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