Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are a good No OP operation for vb.net?

Tags:

vb.net

no-op

Something we can just put break point on while making sure it doesn't do anything else.

In c, that would be while(false);

What to do in vb.net?

like image 566
user4951 Avatar asked Dec 02 '22 20:12

user4951


2 Answers

If you always need it to break there you can put Stop or Debugger.Break()

like image 191
pinkfloydx33 Avatar answered Dec 18 '22 22:12

pinkfloydx33


If you really want a No-Op for some reason (could this turn into a contest for the most ineffectual single line of code?!), how about these?

System.Threading.Thread.Sleep(1) - 1ms is unlikely to have a huge impact outside of a loop

Debug.Write("") - doesn't appear to output anything.

like image 31
AjV Jsy Avatar answered Dec 18 '22 23:12

AjV Jsy