Complete the code to declare an enum named Color.
enum [1] { Red, Green, Blue }The enum is named Color to represent colors.
Complete the switch expression to return the string name of the color.
string GetColorName(Color color) => color switch { Color.Red => [1], _ => "Unknown" };The switch expression returns the string "Red" for Color.Red.
Fix the error in the switch expression to handle all enum values.
string GetColorName(Color color) => color switch { Color.Red => "Red", Color.Green => [1], Color.Blue => "Blue", _ => "Unknown" };The switch expression must return the string "Green" for Color.Green.
Fill both blanks to complete the switch expression that returns a message for each color.
string GetColorMessage(Color color) => color switch { Color.Red => [1], Color.Green => [2], _ => "Color not recognized" };The messages correspond to the colors: Red means "Stop!" and Green means "Go!".
Fill all three blanks to create a switch expression that returns the color's hex code.
string GetColorHex(Color color) => color switch { Color.Red => [1], Color.Green => [2], Color.Blue => [3], _ => "#000000" };The hex codes represent the colors: Red is #FF0000, Green is #00FF00, and Blue is #0000FF.
