943,712 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 5932
  • VB.NET RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Sep 12th, 2008
0

Re: Console.Readline help

i just create a console project and put your code and it works...
Dnx
Reputation Points: 10
Solved Threads: 2
Newbie Poster
Dnx is offline Offline
14 posts
since Jul 2008
Sep 12th, 2008
0

Re: Console.Readline help

Ok Dnx,
So did that, but how do i check if its "." or "," i could only deplay the value in the program at run time.

3dees
Reputation Points: 10
Solved Threads: 0
Newbie Poster
3Dees is offline Offline
23 posts
since Sep 2008
Sep 12th, 2008
0

Re: Console.Readline help

it worked???
Did you convert it to double as well?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
3Dees is offline Offline
23 posts
since Sep 2008
Sep 12th, 2008
0

Re: Console.Readline help

yes, i didn't change anything in your code

maybe check what you enter... and regional settings?
Dnx
Reputation Points: 10
Solved Threads: 2
Newbie Poster
Dnx is offline Offline
14 posts
since Jul 2008
Sep 12th, 2008
0

Re: Console.Readline help

ok Dnx
Tried it again and it worked, will have to check to understand why it didn't worked before.

Dim Liters As String = Console.ReadLine()
quantity = Convert.ToDouble(Liters)

Thanks very much Dnx.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
3Dees is offline Offline
23 posts
since Sep 2008
Sep 12th, 2008
0

Re: Console.Readline help

No problem, glad i could help even if your code was good since the beginning

Regards.
Dnx
Reputation Points: 10
Solved Threads: 2
Newbie Poster
Dnx is offline Offline
14 posts
since Jul 2008
Sep 12th, 2008
0

Re: Console.Readline help

Hey sometimes it just takes a 2nd pair of eyezzzzzz + just this week load VB2008 so now sure if i have all the ms updates.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
3Dees is offline Offline
23 posts
since Sep 2008
Sep 14th, 2008
0

Re: Console.Readline help

hay,
the below method is the method to use type casting and it will execute
u check it (if u want to cast as value use below or else use type cast(source,typename))
Dim a, quantity As Double
Console.Write("How many liters(only whole liters please )? ")
a = Console.ReadLine()
quantity = CType(a, Double)
Console.WriteLine(quantity)
reply pls.,,
Reputation Points: 10
Solved Threads: 0
Newbie Poster
silambharasan is offline Offline
17 posts
since Sep 2008
Sep 15th, 2008
0

Re: Console.Readline help

I know of the "Convert "class in vb and i think you can try this
VB.NET Syntax (Toggle Plain Text)
  1. dim quantity as double
  2. quantity=convert.toDouble(Console.Readline)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
EDDYGATE is offline Offline
7 posts
since Sep 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Automatically type...?!
Next Thread in VB.NET Forum Timeline: Need help in placing icon for windows application





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC