3 public class fall_through
{
5 static void test (string str
) {
6 Console
.WriteLine("testing: '{0}', interned: {1}", str
, String
.IsInterned(str
) != null);
11 Console
.WriteLine("passed");
18 public static void Main(string[] args
)
20 char[] c
= {'t', 'e', 's', 't'}
;
21 string s
= new String (c
);
22 string s2
= new String (c
);
23 Console
.WriteLine("testing built string (interned = {0}) (equal strings: {1})", String
.IsInterned(s
) != null, (object)s
== (object)s2
);
25 Console
.WriteLine("after test 1 (interned = {0}) (equal strings: {1})", String
.IsInterned(s
) != null, (object)s
== (object)s2
);
26 Console
.WriteLine("after test (interned = {0}) (interned2 = {1})", String
.IsInterned(s
) != null, String
.IsInterned(s2
) != null);
27 foreach(string str
in args
)