Lecture on Buddhism

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.