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");
}