How do I convert a value of type string
that needs to be stored in a variable that is of type int
? Here are some conversion codes which is the most appropriate to use for this conversion?
A.a = Integer.valueOf("10")
B.a = int.Parse("10")
C.a = Convert.Numeric("Macedo")
D.a = Convert.ToNumeric("10")
E.a = int.Convert.valueOf("Macedo")