C# StreamWriter Write(Int64)

Description

StreamWriter Write(Int64) Writes the text representation of an 8-byte signed integer to the text string or stream.

Syntax

StreamWriter.Write(Int64) has the following syntax.


public virtual void Write(
  long value
)

Parameters

StreamWriter.Write(Int64) has the following parameters.

  • value - The 8-byte signed integer to write.

Returns

StreamWriter.Write(Int64) method returns

Example


using System;/* w ww.  j a  v  a2s. com*/
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((Int64)123);
        }
    }
}




















Home »
  C# Tutorial »
    System.IO »




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