How to convert string to Int32 using System.Convert in C#?

Below is a sample code snippet demonstrating How to convert string to ToInt32 using System.Convert in C#

using System;

namespace AbundantCode

{

internal class Program

{

// Convert string to Int32 using System.Convert in C#

private static void Main(string[] args)

{

string input = "1985";

int OutPut = System.Convert.ToInt32(input);

Console.ReadLine();

}

}

}