Hello everyone, I'm coming up with a very primitive question:
I need to take two numbers from console and process them. Since I'm getting input from console with Console.Readline(), how can I seperate those numbers from the string?
Thanks in advance..
newbiecoder
0
Junior Poster in Training
Recommended Answers
Jump to PostAre the numbers entered on the same line? If so, what are you delimiting the numbers with?
If it's on 2 seperate lines of entry:
double myNumber = 0; if (double.TryParse(myString, out myNumber) == true) { //The cast worked, myNumber now contains a double parsed from …
Jump to PostOk. Are they seperated by a space, comma, EOL character?
All 6 Replies
skatamatic
371
Practically a Posting Shark
newbiecoder
0
Junior Poster in Training
skatamatic
371
Practically a Posting Shark
newbiecoder
0
Junior Poster in Training
skatamatic
371
Practically a Posting Shark
newbiecoder
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.