C# StreamWriter Write(Single)
Description
StreamWriter Write(Single)
Writes the text representation
of a 4-byte floating-point value to the text string or stream.
Syntax
StreamWriter.Write(Single)
has the following syntax.
public virtual void Write(
float value
)
Parameters
StreamWriter.Write(Single)
has the following parameters.
value
- The 4-byte floating-point value to write.
Returns
StreamWriter.Write(Single)
method returns
Example
using System;/* w w w .j a v a2 s . c o m*/
using System.IO;
using System.Text;
class Program
{
static void Main(string[] args)
{
string fileName = "test.txt";
using (StreamWriter writer = new StreamWriter(fileName))
{
writer.Write(123F);
}
}
}