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?
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Mar 16, 2015, 11:51 AM
In C#, you need to do this explicitly: