Experimenta isso
Java Double.parseDouble(x) Integer.parseInt(x)
Double.parseDouble(x) Integer.parseInt(x)
C# Convert.ToDouble(x) Convert.ToInt32(x)
Convert.ToDouble(x) Convert.ToInt32(x)
Java
C#