.
float km = 57465.0f;
string path = "file.txt";
// Write to file
using (System.IO.StreamWriter sw = new System.IO.StreamWriter(path))
{
sw.WriteLine(km);
}
// Read from file
using (System.IO.StreamReader sr = new System.IO.StreamReader(path))
{
km = float.Parse(sr.ReadLine());
}