In this article, we will write a C# program to convert Float to String using float.ToString() method
class Program
{
static void Main(string[] args)
{
float flt1 = 37.33f;
float flt2 = 49.29f;
string str1 = flt1.ToString();
string str2 = flt2.ToString();
Console.WriteLine(str1 +" " + str2);
Console.ReadLine();
}
}
Output:
37.33 49.29
Read more :
The Tech Platform
Commentaires