What is the best way to turn strings like "red", "green", "yellow", "aliceblue", etc... into the actual System.Drawing.Color value?
I was looking at reflection and something about that didn't seem right.
What is the best way to turn strings like "red", "green", "yellow", "aliceblue", etc... into the actual System.Drawing.Color value?
I was looking at reflection and something about that didn't seem right.
You can use Color.FromName()
System.Drawing.Color.FromName("Red");
System.Drawing.Color has a static method:
Use it like so: