By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,330 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,330 IT Pros & Developers. It's quick & easy.

convert string to int

P: n/a
Hi,

Is there any function in C# to convert a string to a integer number like
'atoi()' function? Thanks,

CT
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
System.Convert.ToInt32(sNumber, 10);

"Chi Tang" <ch********@hotmail.com> wrote in message
news:e0****************@TK2MSFTNGP11.phx.gbl...
Hi,

Is there any function in C# to convert a string to a integer number like
'atoi()' function? Thanks,

CT

Nov 13 '05 #2

P: n/a
int x = Int.Parse("23");

-Noah Coad
Microsoft MVP & MCP [.NET/C#]
"Chi Tang" <ch********@hotmail.com> wrote in message
news:e0****************@TK2MSFTNGP11.phx.gbl...
Hi,

Is there any function in C# to convert a string to a integer number like
'atoi()' function? Thanks,

CT

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.