Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • C#
int i = int.Parse(s);

Throws an error if s can't be converted. int can be replaced with any number data type.
long i = Convert.ToInt64(s);

May throw FormatException and OverflowException.
ToInt32 also exists.
I : Integer := Integer'Value (s);

New implementation...