This is a question about the VB.NET language. Since I am using it every day, I just try to understand the motivations behind some of its constructs.
I just find out that this line :
If myObject Is Nothing then
is as correct as this one is :
If Nothing Is myObject Then
Same results. Using ildasm, we can see that these lines are translated to :
if myObject = null then
and
if null = myObject then
Well, but, in VB.NET, you cannot write :
if myObject = Nothing Then
The compiler will not accept that.
Mmm, to me, If Nothing Is myObject is much more less obvious than If myObject = Nothing.
Why did VB.NET authors just think the opposite ? Any hint ?