Geeks Talk

Prepare for your Next Interview




Regarding Inputs

This is a discussion on Regarding Inputs within the C# forums, part of the Software Development category; hi every body please hlep me how to give int/float values through keyboard...


Go Back   Geeks Talk > Software Development > C#

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 04-17-2007
Junior Member
 
Join Date: Apr 2007
Location: Hyderabad
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Namedm is on a distinguished road
Regarding Inputs

hi every body
please hlep me how to give int/float values through keyboard
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-17-2007
Expert Member
 
Join Date: Dec 2006
Location: Chennai
Posts: 197
Thanks: 2
Thanked 16 Times in 14 Posts
Barbie is on a distinguished road
Re: Regarding Inputs

you have to get a string input using:
System.Console.ReadLine()

and then convert it into int/float using:
Int32.Parse(string)
Reply With Quote
The Following User Says Thank You to Barbie For This Useful Post:
  #3 (permalink)  
Old 06-11-2007
Junior Member
 
Join Date: Feb 2007
Location: India
Posts: 11
Thanks: 3
Thanked 1 Time in 1 Post
dharmagee is on a distinguished road
Re: Regarding Inputs

System.Console.ReadLine() used for reading the inputs. Default all the inputs are treated as string. I you want u can convert the input like float.Parsefloat() and format the input.
Regards,

Dharma
Reply With Quote
Reply

  Geeks Talk > Software Development > C#


Thread Tools
Display Modes



All times are GMT -4. The time now is 12:55 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved