Re: Color data type

Peter Osucha <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <[email protected]>
It surprises me because I was not thinking of this as a 'structure'. :-)

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:[email protected]] On Behalf Of
Stuart Laughlin
Sent: Tuesday, May 01, 2007 3:40 PM
To: [email protected]
Subject: Re: [DOTNET-WINFORMS] Color data type

On 5/1/07, Peter Osucha <[email protected]> wrote:
>
> So it seems that the Color data type is a value type (which surprises
> me).
>

I'm surprised that it surprises you. :)

I think Color is a perfect example of a value type. Red is red, after
all, and there is no sense in differentiating between 'this red'
(R:255 G:0 B:0) and 'that red' (R:255 G:0 B:0).

In other words, the value of a color is determined by its RGB values,
and if color A and color B have the same RGB values then they are
indeed the same color (i.e. equal), regardless of where those RGB
values are stored in memory.


--Stuart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.