[Gtk-sharp-list] Idea: ToString() methods

Steinar Herland steinar.herland@gecko.no
Mon, 19 Aug 2002 11:00:41 +0200


> Is something like this good?

How about trying to stay "compatible" with the output of the classes in
the System.Drawing namespace?

On MS.NET:

Console.WriteLine(new System.Drawing.Point(1,2).ToString());
Console.WriteLine(new System.Drawing.Rectangle(1,2,3,4).ToString());
Console.WriteLine(System.Drawing.Color.Blue.ToString());
Console.WriteLine(System.Drawing.Color.FromArgb(100,100,100).ToString())
;

Prints out this:

{X=1,Y=2}
{X=1,Y=2,Width=3,Height=4}
Color [Blue]
Color [A=255, R=100, G=100, B=100]


Brgds, Steinar