I have this defined in one class:
public
static int ProfCnt = 0;
Then I need to in another class use in an if statement:
if (History.CountProfRec != 0)
But I get error:
Error 1 Operator '==' cannot be applied to operands of type 'method group' and 'int'
Does anyone know what I have to do?
Thanks for the help,
arep.
Error on int in if statement
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Akkiraju IvaturiRank #474 · 5.2K pointsPosted Jan 19, 2013, 5:31 PM EST
By the way the code you have provided is not clear. I am answering you based on the error you specified. This error occurs if you call a method with no "()".
A Repasky139 pointsPosted Jan 21, 2013, 7:08 PM EST
if (History.CountProfRec > 0)
arep