How do I use a byte in an if statement?
public byte MyByte;
if (MyByte)
{
//Code here;
}
Printable View
How do I use a byte in an if statement?
public byte MyByte;
if (MyByte)
{
//Code here;
}
Do you mean byte or bool?
A byte holds an integer between 0 and 255, so you would just use it like this:
Code:public byte MyByte;
if ( MyByte == 0 )
{
//Code here;
}