1.

How Do I Convert A String To An Int In C#?

Answer»

Here's an example:
using System;
CLASS StringToInt
{
public static void MAIN()
{
STRING s = "105";
int x = Convert.ToInt32(s);
Console.WriteLine(x);
}
}

Here's an example:
using System;
class StringToInt
{
public static void Main()
{
String s = "105";
int x = Convert.ToInt32(s);
Console.WriteLine(x);
}
}



Discussion

No Comment Found