c# string to float

C#
  class Program
    {
        static void Main(string[] args)
        {
            string str1 = "5.682";
            string str2 = "4.137";
            float flt1 = float.Parse(str1);
            float flt2 = float.Parse(str2);
            Console.WriteLine(flt1 + flt2);
            Console.ReadLine();
 
        }
    }

Source

Also in C#: