Solved

Invalid expression term '>' in an if statement

Posted on 2008-09-30
4
1,690 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now