?
Solved

Simple validation

Posted on 2007-10-10
4
Medium Priority
?
175 Views
Last Modified: 2010-04-15
In C#, how should I check for a value that has to be
4 or greater:

if (txtOne.Text.Trim()   ??  )  
0
Comment
Question by:MikeMCSD
  • 3
4 Comments
 
LVL 7

Accepted Solution

by:
Abu Hamdan earned 2000 total points
ID: 20053033
if(Convert.ToInt16(txtOne.Text))> 4)
{
..
}
0
 
LVL 7

Expert Comment

by:Abu Hamdan
ID: 20053040
if(Convert.ToInt16(txtOne.Text))>= 4)
{
..
}
0
 
LVL 16

Author Comment

by:MikeMCSD
ID: 20053068
thanks hammdan . .
I just came across "Int32.Parse()"
Is there any difference?
0
 
LVL 7

Expert Comment

by:Abu Hamdan
ID: 20053074
No its the same ,, noth converts to integer
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month13 days, 8 hours left to enroll

749 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