Solved

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

Posted on 2011-03-18
6
195 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 53

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to Office 1 67
Coding for the first time 9 100
Convert VB web project to C# 3 66
Adjust the codes 3 63
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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

732 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