Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
GeneralMessage Closed Pin
8-Aug-10 8:41
nhqlbaislwfiikqraqnm8-Aug-10 8:41 
AnswerRe: Firefox URL Pin
Saint_pl26-Aug-10 5:58
Saint_pl26-Aug-10 5:58 
QuestionCrystal report Pin
tek 20097-Aug-10 0:57
tek 20097-Aug-10 0:57 
AnswerRe: Crystal report Pin
PIEBALDconsult7-Aug-10 6:04
mvePIEBALDconsult7-Aug-10 6:04 
QuestionCannot implicitly convert type 'object' to 'bool' Pin
Tichaona J7-Aug-10 0:49
Tichaona J7-Aug-10 0:49 
AnswerRe: Cannot implicitly convert type 'object' to 'bool' Pin
Luc Pattyn7-Aug-10 1:20
sitebuilderLuc Pattyn7-Aug-10 1:20 
AnswerA suggestion Pin
Richard MacCutchan7-Aug-10 2:45
mveRichard MacCutchan7-Aug-10 2:45 
GeneralRe: A suggestion [modified] Pin
harold aptroot7-Aug-10 4:10
harold aptroot7-Aug-10 4:10 
Richard MacCutchan wrote:
the compiler will give you a much more useful message.


I don't know about that, you'd get "The left-hand side of an assignment must be a variable, property or indexer", which is true of course but it tells you to fix the wrong thing, it's saying that you should change the LHS into a variable. It's also saying that it's an assignment, but that just adds to the confusion because "there is no assignment, so the error makes no sense". OTOH, the "Cannot implicitly convert [type] to bool" is entirely clear, and since it's pointing to an expression in an if it tells you "you stuck something into an if that is not a bool" which is exactly what the problem is.

Or maybe I'm just used to that kind of error..

edit: I did not vote "bad answer" by the way, so don't get mad at me please Smile | :)

modified on Saturday, August 7, 2010 10:34 AM

GeneralRe: A suggestion [modified] Pin
Luc Pattyn7-Aug-10 4:37
sitebuilderLuc Pattyn7-Aug-10 4:37 
GeneralRe: A suggestion Pin
Richard MacCutchan7-Aug-10 5:34
mveRichard MacCutchan7-Aug-10 5:34 
GeneralRe: A suggestion Pin
Luc Pattyn7-Aug-10 5:38
sitebuilderLuc Pattyn7-Aug-10 5:38 
GeneralRe: A suggestion Pin
alton.turner9-Aug-10 14:04
alton.turner9-Aug-10 14:04 
GeneralRe: A suggestion Pin
TNCaver9-Aug-10 6:48
TNCaver9-Aug-10 6:48 
GeneralRe: A suggestion Pin
Luc Pattyn9-Aug-10 6:56
sitebuilderLuc Pattyn9-Aug-10 6:56 
GeneralRe: A suggestion Pin
Kenneth Kasajian9-Aug-10 9:13
Kenneth Kasajian9-Aug-10 9:13 
GeneralRe: A suggestion Pin
Jonathan C Dickinson9-Aug-10 21:44
Jonathan C Dickinson9-Aug-10 21:44 
GeneralRe: A suggestion Pin
Richard MacCutchan9-Aug-10 22:03
mveRichard MacCutchan9-Aug-10 22:03 
GeneralRe: A suggestion Pin
Jonathan C Dickinson10-Aug-10 0:11
Jonathan C Dickinson10-Aug-10 0:11 
GeneralRe: A suggestion Pin
Richard MacCutchan10-Aug-10 0:43
mveRichard MacCutchan10-Aug-10 0:43 
GeneralRe: A suggestion Pin
Jonathan C Dickinson10-Aug-10 1:17
Jonathan C Dickinson10-Aug-10 1:17 
GeneralRe: A suggestion Pin
Richard MacCutchan10-Aug-10 1:48
mveRichard MacCutchan10-Aug-10 1:48 
GeneralRe: A suggestion Pin
Jonathan C Dickinson10-Aug-10 21:25
Jonathan C Dickinson10-Aug-10 21:25 
GeneralRe: A suggestion Pin
Keith Barrow7-Aug-10 5:13
professionalKeith Barrow7-Aug-10 5:13 
GeneralRe: A suggestion Pin
Richard MacCutchan7-Aug-10 7:12
mveRichard MacCutchan7-Aug-10 7:12 
GeneralRe: A suggestion [modified] Pin
PIEBALDconsult7-Aug-10 16:58
mvePIEBALDconsult7-Aug-10 16:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.