CSharp examples for System.Drawing:Color
Color From Name
using System.Windows; using System.Reflection; using System.Windows.Media; using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from w ww . j ava 2 s . c o m*/ public class Main{ public static Color ColorFromName(string name) { var colortype = typeof(Colors); return (Color)colortype.GetProperty(name).GetValue(colortype, null); } }