Thanks for the fish, but I'd like to be a fisherman. =`:^>
How do you run the disassembler to get those answers?
From the command prompt? As a Windows program?
I can launch ildasm.exe as a Windows app, but can't
figure out how to see the IL lines. Would be nice!
-- frosty
* "Steve Peterson said:
Mmm, I guess if I had, or even had a clue what you are talking
about, I probably wouldn't have posted my question in the first
place..
If you would be so kind as to decipher your answer a bit, maybe I
(and others) would have some valuable insight for the future on our
road to being better .Net programmers...
This code
\\\
Dim x As Form
If x Is Nothing Then
Beep()
End If
If IsNothing(x) Then
Beep()
End If
///
compiles to this MSIL:
\\\
IL_0000: nop
IL_0001: ldloc.0
IL_0002: brtrue.s IL_000a
IL_0004: call void
[Microsoft.VisualBasic]Microsoft.VisualBasic.Interaction::Beep()
IL_0009: nop IL_000a: nop
IL_000b: ldloc.0
IL_000c: call bool
[Microsoft.VisualBasic]Microsoft.VisualBasic.Information::IsNothing(object)
IL_0011: brfalse.s IL_0019
IL_0013: call void
[Microsoft.VisualBasic]Microsoft.VisualBasic.Interaction::Beep()
IL_0018: nop IL_0019: nop
IL_001a: nop
IL_001b: ret
///
As you can see, the 2nd method requires a call to the 'IsNothing'
object. This may reduce performance.
<
http://www.plig.net/nnq/nquote.html>