C# Programming - Strings - Discussion
Discussion Forum : Strings - General Questions (Q.No. 10)
10.
Which of the following is correct way to convert a String to an int?
String s = "123"; int i; i = (int)s;
String s = "123"; int i; i = int.Parse(s);
String s = "123"; int i; i = Int32.Parse(s);
String s = "123"; int i; i = Convert.ToInt32(s);
String s = "123"; int i; i = CInt(s);
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers