Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=79441

--- shadow/79441        2006-09-19 08:25:23.000000000 -0400
+++ shadow/79441.tmp.5187       2006-09-19 08:34:13.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 79441
 Product: Mono: Runtime
 Version: 1.1
 OS: GNU/Linux [Other]
 OS Details: 
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: NOTABUG
 Severity: Unknown
 Priority: Normal
 Component: misc
 AssignedTo: [EMAIL PROTECTED]                            
 ReportedBy: [EMAIL PROTECTED]               
 QAContact: [EMAIL PROTECTED]
@@ -50,6 +50,46 @@
 Additional Information:
 mono 1.1.13.6
 
 ------- Additional Comments From [EMAIL PROTECTED]  2006-09-19 08:25 -------
 That's a documentation bug.
 
+
+------- Additional Comments From [EMAIL PROTECTED]  2006-09-19 08:34 -------
+The property behaves as expected because it informs you that the 
+string is not interned.
+
+Only string literals are interned by default.
+
+Note that MS.NET prints False as well.
+
+If you need a True, use this:
+using System;
+using System.Text;
+
+public class StringExample {
+    public static void Main() {
+
+        String s1 = String.Intern(new StringBuilder().Append
+("My").Append("Test").ToString());
+
+        Console.WriteLine(String.IsInterned(s1) != null);
+    }
+}
+
+Or this:
+using System;
+using System.Text;
+
+public class StringExample {
+    public static void Main() {
+
+        String s1 = new StringBuilder().Append("My").Append
+("Test").ToString();
+       String s2 = "MyTest";
+
+        Console.WriteLine(String.IsInterned(s1) != null);
+       // This is not required I only added to ensure that s2
+       // won't be optimized out.
+       GC.KeepAlive(s2);
+    }
+}
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to