Board index » Visual Studio » NOP Statements in IL

NOP Statements in IL

Visual Studio223
When I look at the IL, using ILDASM, why does the VB.NET version have so

many NOP statements? The C# version doesn't seem to. What gives?


-
 

Re:NOP Statements in IL

Randy,

VB.NET, as does C# 2.0, injects NOP statements into the IL to simplify

debugging, I understand mostly to allow you to put breakpoints on statements

that otherwise you could not (such as End If). I want to say .NET 2.0 puts

more NOP statements to help with the Edit & Continue feature of the debugger

(I don't have the specific reference handy, I just remember reading

something to that effect).



To remove them simply compile your project under the Release build, see

"Project - Configuration Manager - Active Solution Configuration" or simply

use the drop down on the tool bar.



Hope this helps

Jay



"Randy Given" <GivenRandy@aol.com>wrote in message

Quote
When I look at the IL, using ILDASM, why does the VB.NET version have so

many NOP statements? The C# version doesn't seem to. What gives?







-

Re:NOP Statements in IL

Hi,

Check the 'Debugging and nop instructions' section of this artilce:

http://msdn.microsoft.com/library/default.asp?url" rel="nofollow" target="_blank">msdn.microsoft.com/library/default.asp=/library/en-us/dv_vstechart/html/vbtchmicrosoftvisualbasicnetinternals.asp







"Randy Given" <GivenRandy@aol.com>wrote in message

When I look at the IL, using ILDASM, why does the VB.NET version have so

many NOP statements? The C# version doesn't seem to. What gives?







-

Re:NOP Statements in IL

Thanks!





-

Re:NOP Statements in IL

Thanks for the URL!





-