C# StringWriter WriteLine(String)
Description
StringWriter WriteLine(String)
Writes a string followed
by a line terminator to the text string or stream.
Syntax
StringWriter.WriteLine(String)
has the following syntax.
public virtual void WriteLine(
string value
)
Parameters
StringWriter.WriteLine(String)
has the following parameters.
value
- The string to write. If value is null, only the line terminator is written.
Returns
StringWriter.WriteLine(String)
method returns
Example
using System;// w w w. j a va 2 s .co m
using System.Globalization;
using System.IO;
class StrWriter
{
static void Main()
{
StringWriter strWriter = new StringWriter();
strWriter.WriteLine("from java2s.com");
Console.WriteLine(strWriter.ToString());
}
}
The code above generates the following result.