"CLR Via C #" Reading notes, continuous update ...

Source: Internet
Author: User

Write a fast 5 years of code, has been the use of other people invented the language, others invented the framework for rapid development, but never really deep learning the bottom of some things, so this year I intend to read the "CLR Via C #" This book, to understand the C # of the bottom, I think this book at least for the future of Code tuning useful, The following reading notes only record the points that I see in the course of reading that are useful and usually not easily noticed. Record in sequence, until the day the book is fully read, the article will be sorted.

Fourth-type Basics

If (O is String)//First check
{
String B = (string) o;//second time
}
For this reason, the. Net invented as simplifies this process
String a = O as String;
if (A! = NULL) {//Although there is still a 2nd judgment here, it is faster to judge whether the null pointer speed is more than the type judgment
//...
}

If a class with the same name exists under more than one namespace, you must write the fully qualified name to the new object in the code. You can use aliases to define these fully qualified names, such as

Using A;

Using B;

Using Testa = A.widget;

So in the original code you might want to write A.widget = new A.widget ();

With an alias you just write Testa = new Testa ();

"CLR Via C #" Reading notes, continuous update ...

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.