C# StringWriter Write(Double)

Description

StringWriter Write(Double) Writes the text representation of an 8-byte floating-point value to the text string or stream.

Syntax

StringWriter.Write(Double) has the following syntax.


public virtual void Write(
  double value
)

Parameters

StringWriter.Write(Double) has the following parameters.

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

Returns

StringWriter.Write(Double) method returns

Example


//from   w  w w. j  av  a  2 s.c  om
using System;
using System.Globalization;
using System.IO;

class StrWriter
{
    static void Main()
    {
        StringWriter strWriter = new StringWriter();

        strWriter.Write(123D);
        
        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