Quote Originally Posted by Poppa Mintin View Post
I had a bit of trouble detecting a miss-spelt or unknown colour, just converting the String to a Color doesn't automatically cause an error, it just gives 'Black'
vb.net Code:
  1. Dim names = {"Red", "Rid"}
  2.  
  3. For Each s In names
  4.     If [Enum].IsDefined(GetType(KnownColor), s) Then
  5.         Console.WriteLine($"There is a known colour named '{s}'.")
  6.     Else
  7.         Console.WriteLine($"There is NOT a known colour named '{s}'.")
  8.     End If
  9. Next