Cant fix this
Been trying to fix that purple part for ages. VS says: Operators "==" cannot be applied to operands of type 'object' and 'bool'.
messageLabel.Text="The Game has already ended.\nClick the Start button for another game";
intStatus = CompareWithNumber(intTemp);
messageLabel.Text="Congratulation! It's Correct";
Any idea what I can do to fix it?
I suppose, CheckValidInput is a function returning an object (which might be a class of yours).
On the right sight of the operator, you have something that is is type bool. How should the compiler compare them??? Of course he doesn't know, neither do I.
What you should do, is to overload the operator, on order to say to the compiler how to compare them. Or, I suppose that your class has a data member of type bool, which is really what you want to compare. So, you should have a public accessor, which returns this bool data member.