Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 4.0 aka C# 2010 > BOOK: Beginning Visual C# 2010
|
BOOK: Beginning Visual C# 2010
This is the forum to discuss the Wrox book Beginning Visual C# 2010 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, ; ISBN: 9780470502266
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 2010 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2013, 06:23 PM
Registered User
 
Join Date: Feb 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Talking Understanding and how to use the int.Parse

I'm try to use the int.parse to determine to let a person gain access. So how to use the int.parse to say if he/she is 18 and under(Access denied) and if he/she is 18 and over (Access Granted).


Thanks

Leroy
 
Old March 12th, 2013, 09:28 AM
Authorized User
 
Join Date: Aug 2010
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

Code:
int age;

age = int.Parse(txtDisplay.Text);

If (age >= 18) 
{
txtOutput.Text("Access Granted");
}

Else 

txt.Output.Text("Access Denied");





Similar Threads
Thread Thread Starter Forum Replies Last Post
Int to Char and Char to Int Function jbburf Excel VBA 1 December 20th, 2012 07:27 PM
Difference bet Convert.Toint32 and Int.Parse anujrathi General .NET 3 September 8th, 2007 02:31 AM
PHP Parse error: parse error, unexpected T_STRING geminient PHP How-To 4 August 18th, 2007 02:27 AM
int? asn187 C# 2 March 30th, 2007 06:05 AM
Parse error: parse error, unexpected $end Ayodeji Adegbaju Pro PHP 3 January 12th, 2007 12:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.