Cannot convert type 'int' to 'bool'
- From: John <no@xxxxxxxx>
- Date: Fri, 21 Sep 2007 21:39:26 -0700
The following code:
int test = 1;
bool isTrue = (bool)test;
results in a compiler error:
Cannot convert type 'int' to 'bool'
wtf, any ideas on how to work around this?
.
- Follow-Ups:
- Re: Cannot convert type 'int' to 'bool'
- From: Registered User
- Re: Cannot convert type 'int' to 'bool'
- From: Jonathan Wood
- Re: Cannot convert type 'int' to 'bool'
- Prev by Date: Re: POP3 Locking up computer
- Next by Date: Re: Cannot convert type 'int' to 'bool'
- Previous by thread: regexp question
- Next by thread: Re: Cannot convert type 'int' to 'bool'
- Index(es):
Relevant Pages
|