StreamWriter.WriteLineAsync Method (Char)
Writes a character followed by a line terminator asynchronously to the stream.
Assembly: mscorlib (in mscorlib.dll)
<ComVisibleAttribute(False)> <HostProtectionAttribute(SecurityAction.LinkDemand, ExternalThreading := True)> Public Overrides Function WriteLineAsync ( value As Char ) As Task
The character to write to the stream.
Return ValueType: System.Threading.Tasks.Task
A task that represents the asynchronous write operation.
The following example shows how to write a single character (the letter "a") to a line in a text file, followed by another line that contains a single character (the letter "b"), by using themethod.
Imports System.IO Imports System.Text Module Module1 Sub Main() WriteCharacters() End Sub Async Sub WriteCharacters() Dim firstChar As Char = "a" Dim secondChar As Char = "b" Using writer As StreamWriter = File.CreateText("newfile.txt") Await writer.WriteLineAsync(firstChar) Await writer.WriteLineAsync(secondChar) End Using End Sub End Module
Available since 8
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Available since 8.1