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
Hideki Snk
NA
5
0
only 4 integers allowed?
Oct 19 2007 7:40 AM
Hi,
here the question.. i wanted to knw if i can set the limit of the input that user can keyin only 4 integers number.. by default, i use this kind of code ..
input:
Console.WriteLine("4 integers number");
Console.Write(" User input: ");
int j = int.Parse(Console.ReadLine());
if ((j < 1000) || (j > 10000))
{
Console.Clear();
Console.WriteLine("Error!!Please input 4 digit integers");
goto input;
}
by the way, if u see the code.. 0000-0999 cant be read since the condition is 1000-10000..
so is there anyway to solve this problem so that i can input 0000-0999?
Reply
Answers (
1
)
Need help with my project
TextBox.Name