Solved

Invalid expression term '>' in an if statement

Posted on 2008-09-30
4
1,696 Views
Last Modified: 2012-08-14
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
Comment
Question by:kwh3856
  • 2
4 Comments
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 250 total points
ID: 22608271
if ((int.Parse(Oct1)) > 9)
{
  Ozip1 = Oct1 + OriginZip.Substring(1,3);
}
0
 
LVL 8

Assisted Solution

by:rambovn
rambovn earned 250 total points
ID: 22608277
if ((int.parse(Oct1)) > 9)
{
  Ozip1 = Oct1 + OriginZip.Substring(1,3);
}
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 22608298
Or you can remove one level bracket also , like...

if (int.Parse(Oct1) > 9)
{
  Ozip1 = Oct1 + OriginZip.Substring(1,3);
}
0
 

Author Closing Comment

by:kwh3856
ID: 31501672
Thanks for such a quick response
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question