• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1713
  • Last Modified:

Invalid expression term '>' in an if statement

Can someone guide me to what I am missing here.  I am trying to do a simple if statement and keep getting this error message.

if (int.parse(Oct1)) > 9)------------------------------Line errors out here with squiggly under the >
{
  Ozip1 = Oct1 + OriginZip.Substring(1,3);
}
0
kwh3856
Asked:
kwh3856
  • 2
2 Solutions
 
Roshan DavisCommented:
if ((int.Parse(Oct1)) > 9)
{
  Ozip1 = Oct1 + OriginZip.Substring(1,3);
}
0
 
rambovnCommented:
if ((int.parse(Oct1)) > 9)
{
  Ozip1 = Oct1 + OriginZip.Substring(1,3);
}
0
 
Roshan DavisCommented:
Or you can remove one level bracket also , like...

if (int.Parse(Oct1) > 9)
{
  Ozip1 = Oct1 + OriginZip.Substring(1,3);
}
0
 
kwh3856Author Commented:
Thanks for such a quick response
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now