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);
Comments and Answers (2)
Li
need help, explain answer
Lavish
please post an explanation
{{SampleComment.userName || "Your Name"}} ~ {{SampleComment.userCity}}
{{SampleComment.commentValue || "Your Answer or Comment goes here...."}}