Your technology certification is waiting. Enroll in Cloud Class ®
// best, using Color's static method Color red1 = Color.FromName("Red"); // using a ColorConverter TypeConverter tc1 = TypeDescriptor.GetConverter(typeof(Color)); // ..or.. TypeConverter tc2 = new ColorConverter(); Color red2 = (Color)tc.ConvertFromString("Red"); // using Reflection on Color or Brush Color red3 = (Color)typeof(Color).GetProperty("Red").GetValue(null, null); // in WPF you can use a BrushConverter SolidColorBrush redBrush = (SolidColorBrush)new BrushConverter().ConvertFromString("Red");
Open in new window
Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.