Answers for "to float in c#"

C#
7

c# string to float

  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();
 
        }
    }
Posted by: Guest on March-12-2020
11

float to int c#

Convert.ToInt32(float)
Posted by: Guest on April-30-2020
2

what is float in c#

//float in c# sharp is (like in a lot of languages)
//a variable that can contain numbers and fractions
//in contrast to int that is used just for integers
Posted by: Guest on March-05-2021

C# Answers by Framework

Browse Popular Code Answers by Language