Questions tagged [brushes]

47 questions
-1
votes
1 answer

Visual Studio 2012 complains about comparing two Brushes

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…
bhs67
  • 29
  • 4
-3
votes
1 answer

Comparison between 2 System.Drawing.Brushes fails

here's another quirk in .net 4.0 i found: When i want to check if a variable, which holds a System.Drawing.Brush, holds a certain Brush, like: using System.Drawing; HisCell.Col == Brushes.White it sometimes fails, despite the fact I assigned…
user2762996
  • 566
  • 1
  • 5
  • 16
1 2 3
4