Today we are talking about Buddhism.
Fo Yue: Empty is color, color is empty.
Our major is: NULL can be assigned to any class, and any class can be assigned null.
Everything is an object, empty, and no exception.
However, Buddhism is a headache. He also believes that,
Yes, and yes. Such an old monk can make you dizzy.
So empty, nothing.
How can this be understood?
C #Code,
An example is as follows:
Static void main (string [] ARGs)
{
Console. writeline (null is form );
Console. writeline (null is button );
Console. writeline (null is trackbar );
Console. writeline (null is domainupdown );
Console. writeline (null is graphics );
Console. writeline (null is string );
Console. writeline (null is array );
}
ProgramOutput:
False
False
False
False
False
False
False
Press any key to continue...
It seems that nothing is empty ..
All judgments are false, indicating that null is not arbitrary.
Object
Here I just give an example of some inheritance from the reference type. Not to mention the value type.
But the other side does look like this:
static void main (string [] ARGs)
{< br> testmethod1 (null);
testmethod2 (null);
testmethod3 (null );
testmethod4 (null);
testmethod5 (null);
testmethod6 (null);
testmethod7 (null);
}
Public static void testmethod1 (form value)
{}< br> Public static void testmethod2 (Button value)
{}< br> Public static void testmethod3 (trackbar value)
{}< br> Public static void testmethod4 (domainupdown value)
{}< br> Public static void testmethod5 (Graphics value)
{}< br> Public static void testmethod6 (string value)
{}< br> Public static void testmethod7 (array value)
{}
Compile this code and it runs well ..
That is to say, if we only judge from the type, null is all objects.
This is confusing. Is it color empty? Is null an object?
This is one of the reasons why programmers generally oppose the "most fundamental principle of accountability" of dogma-type students.
I believe that many people here are already at the forefront.
Corresponding to the beginning.
This lecture ends.