I'm working with Xamarin, and I need something that looks like this:
public Colors = new object() {
Blue = Xamaring.Color.FromHex("FFFFFF"),
Red = Xamarin.Color.FromHex("F0F0F0")
}
So I can later do something like this:
myObject.Colors.Blue // returns a Xamarin.Color object
But of course, this doesn't compile. Aparently, I need to create a complete new class for this, something I really don't want to do and don't think I should. In javascript, I could do something like this with:
this.colors = { blue: Xamarin.Color.FromHex("..."), red: Xamarin... }
Is there a C sharp thing that can help me achieve this quickly? Thank you