Visual Studio 2012 complains about comparing two Brushes

45 views Asked by At

Visual Studio 2012 complains about comparing two Brushes:

private void SetLabel(string stText, Brushes colorBackground)
{
  if (colorBackGround == Brushes.Yellow)
 ...
}

Error message: "The name 'colorBackGround' does not exist in the current context"

1

There are 1 answers

0
Michael On

colorBackGround is not the same as colorBackground! C# is case sensitive