compiling

  • Thread starter Thread starter RobcPettit
  • Start date Start date
R

RobcPettit

hi, couls somebody have a look at this code and advise me were im going
wrong, im getting errors like with the first { but if i try to alter
this then the if's through up errors. It is part of other code but each
of the other regions have no errors. I am a complete beginner so Im
sorry if I ve missed something obvious.
#region Private methods
/*** Check header is valid**/
private bool IsAValidHeader(string minorErrorCode, APIResponseHeader
header);
{
bool rtn = true;
if (minorErrorCode != null)

{
errorMessage = "Minor error code; " + minorErrorCode;

}

if (header.minorErrorCode != null);

{
errorMessage = "Minor error code" + header.minorErrorCode;
}

if (header.errorCode != APIErrorEnum.OK);

{
errorMessage = "Header error" + header.errorCode.ToString();
rtn = false;
}

return rtn;
}

#endregion

Regards Robert
 
Thankyou very much for your reply, that has solved the errors. Is this
the norm for method headers.
Regards Robert
 
Thankyou very much for your reply, that has solved the errors. Is this
the norm for method headers.
Regards Robert

Yes. A method definition looks like this:

modifiers type name(parameters) { code }

not:

modifiers type name(parameters); { code }
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top