TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
centra
NA
19
1.6k
Readline errors when user submits null or string
Nov 2 2011 12:47 PM
I am writing a console application, that gives the user a numerical choice to pick from (1-3). I have my logic down correctly, so that if they select 1-3 it works, but will cycle back through the loop if they choose any number outside that range and write a string error message "Invalid Entry! Please select 1-3 only.".
The problem I am running into is that if you just hit enter, without entering anything at all, it errors out. Or if you submit an alpha character instead of a number, it also errors out. How do I write it so that null entries or string/char entries will not bug it out when it is looking for only an int entry?
Reply
Answers (
19
)
How to change an Excel cell's background color?
C# Encog Neural Network wrong results