SFML community forums
Bindings - other languages => DotNet => Topic started by: FRex on May 25, 2014, 04:35:52 am
-
This line looks very weird to me even though I don't really know C#:
https://github.com/SFML/SFML.Net/blob/master/src/Graphics/Color.cs#L81
Isn't it always true if obj is a color?
shouldn't it instead read one of these or similar?
return (obj
is Color
) && Equals
(obj
as Color
); return (obj
is Color
) && Equals
((Color
)obj
);
-
You're right. Another possibility:
return (obj
is Color
) && obj
.Equals(this);
-
Oh yea, sorry, my mistake, I forgot to put obj. before Equals(this), I will correct it.