Prepare for your Next Interview
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...
|
|||
|
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) |
| The Following User Says Thank You to Barbie For This Useful Post: | ||
|
|||
|
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 |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|