Comparing Excel cell’s Font color to that of System.Drawing.Color.FromArgb
I am trying to compare an Excel cell’s color to determine if it matches a known System.Drawing.Color. This code worked in VB6 but when I try to accomplish that in C# I get the error “Operator ‘==’ cannot be applied to operands of type ‘object’ and ‘Color'”. Here is the code:
Comparing Excel cell’s color to that of System.Drawing.Color.FromArgb using C# Excel Interop
I am trying to compare an Excel cell’s color to determine if it matches a known System.Drawing.Color. This code worked in VB6 but when I try to accomplish that in C# I get the error “Operator ‘==’ cannot be applied to operands of type ‘object’ and ‘Color'”. Here is the code: