C# StringWriter WriteLine(Single)

Description

StringWriter WriteLine(Single) Writes the text representation of a 4-byte floating-point value followed by a line terminator to the text string or stream.

Syntax

StringWriter.WriteLine(Single) has the following syntax.


public virtual void WriteLine(
  float value
)

Parameters

StringWriter.WriteLine(Single) has the following parameters.

  • value - The 4-byte floating-point value to write.

Returns

StringWriter.WriteLine(Single) method returns

Example


/* w w w  .j a  v  a 2  s.c om*/
using System;
using System.Globalization;
using System.IO;

class StrWriter
{
    static void Main()
    {
        StringWriter strWriter = new StringWriter();
        
        strWriter.WriteLine(123F);
        
        Console.WriteLine(strWriter.ToString());
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.IO »




BinaryReader
BinaryWriter
Directory
DirectoryInfo
DriveInfo
File
FileInfo
FileStream
MemoryStream
Path
StreamReader
StreamWriter
StringReader
StringWriter