?
Solved

Invalid expression term '>' in an if statement

Posted on 2008-09-30
4
Medium Priority
?
1,707 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 23

Accepted Solution

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

Assisted Solution

by:rambovn
rambovn earned 1000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

801 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