[Mono-bugs] [Bug 52695][Wis] New - Brushes.cs behavior is not consistent with .NET

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 9 Jan 2004 01:18:19 -0500 (EST)


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 rkumar@novell.com.

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

--- shadow/52695	2004-01-09 01:18:19.000000000 -0500
+++ shadow/52695.tmp.2789	2004-01-09 01:18:19.000000000 -0500
@@ -0,0 +1,62 @@
+Bug#: 52695
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System.Drawing.
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: rkumar@novell.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Brushes.cs behavior is not consistent with .NET
+
+Description of Problem:
+The Brushes.cs does not show the same behavior on Mono as it does on .NET.
+
+Steps to reproduce the problem:
+1. Compile and run the following code,
+
+public class TestBrushes
+{
+	public static void Main() 
+	{
+		SolidBrush sbr = (SolidBrush) Brushes.Teal;
+		// actual color
+		Console.WriteLine("color: " + sbr.Color);
+
+		sbr.Color = Color.Red;
+		// modified color
+		Console.WriteLine("color: " + sbr.Color);
+
+		SolidBrush sbr1 = (SolidBrush) Brushes.Teal;
+		// actual color of another object from Brushes
+		Console.WriteLine("color: " + sbr1.Color);
+	}
+}
+
+Actual Results:
+//**** .NET ****
+// color: Color [Teal]
+// color: Color [Red]
+// color: Color [Red]
+
+//**** Mono ****
+// color: Color [Teal]
+// color: Color [Red]
+// color: Color [Teal]
+
+Expected Results:
+Don't know. May be a bug in .NET.
+
+How often does this happen? 
+Always.
+
+Additional Information:
+Looks like Brushes.cs does not create a new Brush for every request unlike 
+Mono, where every time new Brush is created.