Equivalent Stop command VB.NET in C#.NET?

D

DKode

Hello,

I have been using VB.NET for about 5 months and now I decided it's
time to start using C#.NET because I like the syntax setup alot more,
because it more closely resembles php/perl which are my string points.

I am trying to debug a project, in VB.NET i could put in a "Stop"
statement to make the debugger stop at that point, then i could use
F10 and F11 to step through the code.

How come I can't use "Stop" in C#, what is the equivalent in C# to the
stop command in vb?

thanks
 
M

Marina

You can just set a breakpoint on a line of code, and the debugger will stop
there when it reaches that point. You can then do f10/f11 to step through
the code.
 
N

Nicholas Paldino [.NET/C# MVP]

DKode,

You can call the static Break method on the Debugger class to do this.

Hope this helps.
 
D

DKode

Thank you Nicholas,

I knew that I could set a break point, but i was looking for exactly
what you mentioned... a method call that I could place wherever I need
it.

Thank you again everyone!

Nicholas Paldino said:
DKode,

You can call the static Break method on the Debugger class to do this.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

DKode said:
Hello,

I have been using VB.NET for about 5 months and now I decided it's
time to start using C#.NET because I like the syntax setup alot more,
because it more closely resembles php/perl which are my string points.

I am trying to debug a project, in VB.NET i could put in a "Stop"
statement to make the debugger stop at that point, then i could use
F10 and F11 to step through the code.

How come I can't use "Stop" in C#, what is the equivalent in C# to the
stop command in vb?

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top