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; }
public byte MyByte; if ( MyByte == 0 ) { //Code here; }
How much does it really cost to run your car?
Forum Rules