From b48177ff15b85a476e254db16d42bb38006916b4 Mon Sep 17 00:00:00 2001 From: ChrisDill Date: Wed, 26 Jan 2022 20:30:38 +0000 Subject: [PATCH] Review ToString usage --- Raylib-cs/types/Color.cs | 2 +- Raylib-cs/types/Shapes.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Raylib-cs/types/Color.cs b/Raylib-cs/types/Color.cs index 243f8bd..9febe48 100644 --- a/Raylib-cs/types/Color.cs +++ b/Raylib-cs/types/Color.cs @@ -61,7 +61,7 @@ namespace Raylib_cs public override string ToString() { - return string.Concat(r.ToString(), " ", g.ToString(), " ", b.ToString(), " ", a.ToString()); + return $"{{r:{r} g:{g} b:{b} a:{a}}}"; } } } diff --git a/Raylib-cs/types/Shapes.cs b/Raylib-cs/types/Shapes.cs index b403521..c2a3ea6 100644 --- a/Raylib-cs/types/Shapes.cs +++ b/Raylib-cs/types/Shapes.cs @@ -21,6 +21,11 @@ namespace Raylib_cs this.width = width; this.height = height; } + + public override string ToString() + { + return $"{{x:{x} y:{y} width:{width} height:{height}}}"; + } } /// Bounding box type