C# StringWriter Write(Single)
Description
StringWriter Write(Single)
Writes the text representation
of a 4-byte floating-point value to the text string or stream.
Syntax
StringWriter.Write(Single)
has the following syntax.
public virtual void Write(
float value
)
Parameters
StringWriter.Write(Single)
has the following parameters.
value
- The 4-byte floating-point value to write.
Returns
StringWriter.Write(Single)
method returns
Example
using System;/*w w w. jav a 2s. c o m*/
using System.Globalization;
using System.IO;
class StrWriter
{
static void Main()
{
StringWriter strWriter = new StringWriter();
strWriter.Write(123F);
Console.WriteLine(strWriter.ToString());
}
}
The code above generates the following result.