john ranella

john ranella

  • 1.5k
  • 177
  • 5.4k

error CS0029

Mar 16 2015 11:14 AM
hi,
i've this code:
 ----------------------------------------------------------------------
static byte EnabledFlags = 0;
static int index = 0;
 
public static void Main (string[] args)
{
if ((EnabledFlags & (1 << index)))
{
return;
}
 
}
  ----------------------------------------------------------------------
but the error is :
 error CS0029:Cannot implicitly convert type 'int' to 'bool'
 
what is the soluytion for this error or can i write the same code in another way?
 

Answers (1)