R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which method is used to convert a string to an integer in C#?

  • (A) ToInt()
  • (B) Convert.ToInt32()
  • (C) ParseInt()
  • (D) Int.Parse()

Explanation by: Ram Sharma
`Convert.ToInt32()` converts a string to an integer safely and is widely used.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.