how to read integer value in c#?

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Feb 2007
Posts: 20
Reputation: shadowrider is an unknown quantity at this point 
Solved Threads: 0
shadowrider's Avatar
shadowrider shadowrider is offline Offline
Newbie Poster

how to read integer value in c#?

 
0
  #1
Feb 4th, 2007
if i want to read some integer what command i must use
how to do i read and save value in multi dimensional array??

urgently needed:-|
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,646
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1498
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: how to read integer value in c#?

 
0
  #2
Feb 5th, 2007
maybe this short tutorial will help you. Follow the link near the bottom of the page for other tutorials.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 20
Reputation: shadowrider is an unknown quantity at this point 
Solved Threads: 0
shadowrider's Avatar
shadowrider shadowrider is offline Offline
Newbie Poster

Re: how to read integer value in c#?

 
0
  #3
Feb 5th, 2007
Originally Posted by Ancient Dragon View Post
maybe this short tutorial will help you. Follow the link near the bottom of the page for other tutorials.

that link is telling how to read from a file I want to know how to read from keyboard.
Like we have have cin command in c++ and scanf in C
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 88
Reputation: blacklocist is an unknown quantity at this point 
Solved Threads: 2
blacklocist blacklocist is offline Offline
Junior Poster in Training

Re: how to read integer value in c#?

 
0
  #4
Feb 7th, 2007
If your using a Console app it should be

string strTemp = Console.Readline()
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 20
Reputation: shadowrider is an unknown quantity at this point 
Solved Threads: 0
shadowrider's Avatar
shadowrider shadowrider is offline Offline
Newbie Poster

Re: how to read integer value in c#?

 
0
  #5
Feb 7th, 2007
Originally Posted by blacklocist View Post
If your using a Console app it should be

string strTemp = Console.Readline()

but i said i wanted to read integer tht will read integer as character
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 483
Reputation: campkev is an unknown quantity at this point 
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: how to read integer value in c#?

 
0
  #6
Feb 7th, 2007
int intTemp = Convert.ToInt32(Console.Readline())
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 20
Reputation: shadowrider is an unknown quantity at this point 
Solved Threads: 0
shadowrider's Avatar
shadowrider shadowrider is offline Offline
Newbie Poster

Re: how to read integer value in c#?

 
0
  #7
Feb 7th, 2007
Originally Posted by campkev View Post
int intTemp = Convert.ToInt32(Console.Readline())
i have also found one other way that is
int n= int.Parse(Console.ReadLine());
thanks pal that is great
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 88
Reputation: blacklocist is an unknown quantity at this point 
Solved Threads: 2
blacklocist blacklocist is offline Offline
Junior Poster in Training

Re: how to read integer value in c#?

 
0
  #8
Feb 7th, 2007
Crap forgot that he wanted a integer and not a string.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 20
Reputation: shadowrider is an unknown quantity at this point 
Solved Threads: 0
shadowrider's Avatar
shadowrider shadowrider is offline Offline
Newbie Poster

Re: how to read integer value in c#?

 
0
  #9
Feb 8th, 2007
Originally Posted by blacklocist View Post
Crap forgot that he wanted a integer and not a string.

no prob it is done now thanks for answering
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C# Forum


Views: 14562 | Replies: 8
Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC