[You must know. NET] 22nd: String presence (top)---thinking with questions

Source: Internet
Author: User

A tightrope walker, who experiences pleasure in stimulation. Think with questions and spark sparks on the issue.

Or to answer questions, or to answer questions, you may never see them all, but you can always break through a little bit. The key to the fact is to face the problem, how do I think?

String interning is a topic worthy of thought, and with questions in mind, we should at least clarify the following questions:

What is String?

What is a string resident?

What is the running mechanism and execution process of string hosting?

Other questions that the string resides in?

With a few question marks, you have to know. NET, to continue to experience more.

1 with questions?

Thinking with questions, is the best practice of technical exploration, whenever I received a lot of friends letter to discuss the technical issues, can always give me a lot of technical thinking and surprises, today our topic is a letter from a friend began, you can open Kimogigi through the link in to Wang Tao The question of a wonderful thought and discussion, with his questions, lead me to think, complete this article on a little bit of string.

First of all, this article starts with 8 tests without exception, and hopefully the reader will be able to think about the answers along these few simple examples. If you are passionate about this, you might want to try it.

// Release : code01, 2008/08/20

     // Author : Anytao, http://www.anytao.com

     static void Main()

     {

       string s1 = "abc";

       Console.WriteLine(string.IsInterned(s1) ?? "null");

}

This is a simple example that can be quickly answered.

// Release : code02, 2008/08/20

     // Author : Anytao, http://www.anytao.com

     static void Main()

     {

       string s1 = "ab";

       s1 += "c";

       Console.WriteLine(string.IsInterned(s1) ?? "null");

}

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.