Casting String Color to System.Drawing.Color

kentheprogger

Newcomer
Joined
Apr 2, 2006
Messages
24
I have run into a little problem, I have an XML document that I read controls from and instance them to a form. What I want to do is without if statements, cast a string color like "White" to System.Drawing.Color.

Any help would be greatly appreciated.
 
kentheprogger said:
I have run into a little problem, I have an XML document that I read controls from and instance them to a form. What I want to do is without if statements, cast a string color like "White" to System.Drawing.Color.

Any help would be greatly appreciated.

Solved my own problem, it was simple:

Color.FromName("White")
 
Back
Top