StreamWriter::WriteLineAsync Method (array<Char>^, Int32, Int32)
Writes a subarray of characters followed by a line terminator asynchronously to the stream.
Assembly: mscorlib (in mscorlib.dll)
public: [ComVisibleAttribute(false)] [HostProtectionAttribute(SecurityAction::LinkDemand, ExternalThreading = true)] virtual Task^ WriteLineAsync( array<wchar_t>^ buffer, int index, int count ) override
The character array to write data from.
The character position in the buffer at which to start reading data.
The maximum number of characters to write.
Return ValueType: System.Threading.Tasks::Task^
A task that represents the asynchronous write operation.
buffer is null.
The index plus count is greater than the buffer length.
index or count is negative.
The stream writer is disposed.
The stream writer is currently in use by a previous write operation.
The following example shows how to write characters to two separate lines in a text file by using themethod. The first line contains the first 11 characters from the string (the letters "First line" followed by a space). The second line contains the remaining characters from the string (the letters "and second line").
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