Hi,
Are you converting a byte to string, then the string back to bool?
What is the point of that?
the easiest and I believe fastest way of doing this is
bool b= byte_var >0;
why using Convert.XXX methods or any other method, for something that can be
solved with a simple operation?
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Drebin" <th*******@hotmail.com> wrote in message
news:L3*******************@newssvr19.news.prodigy. com...
I also enjoy doing something like:
bool a = bool.Parse(i2.ToString());
"Chris" <ch********@pandora.be> wrote in message
news:tv***********************@phobos.telenet-ops.be... Hi,
I try to print out truth-tables for an &&-operation using the following
code, unfortunatly I get compiler errors :
for ( byte i1=0; i1<=1; i1++)
{
for ( byte i2=0; i2<=1; i2++)
{
bool a = (bool)i1; // ERROR : convert type 'byte' to
'bool' bool b = (bool)i2; // ERROR : convert type 'byte' to
'bool' bool result = a && b;
}
}
how do I solve this ?
thnx
Chris