C# StringWriter WriteLine(Decimal)

Description

StringWriter WriteLine(Decimal) Writes the text representation of a decimal value followed by a line terminator to the text string or stream.

Syntax

StringWriter.WriteLine(Decimal) has the following syntax.


public virtual void WriteLine(
  decimal value
)

Parameters

StringWriter.WriteLine(Decimal) has the following parameters.

  • value - The decimal value to write.

Returns

StringWriter.WriteLine(Decimal) method returns

Example


using System;//from   w  w  w  .j a  v a  2 s . c o  m
using System.Globalization;
using System.IO;

class StrWriter
{
    static void Main()
    {
        StringWriter strWriter = new StringWriter();
        
        strWriter.WriteLine(123.123M);
        
        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