FileIO.WriteLinesAsync Method

Definition

Overloads

WriteLinesAsync(IStorageFile, IEnumerable<String>)

Writes lines of text to the specified file.

WriteLinesAsync(IStorageFile, IEnumerable<String>, UnicodeEncoding)

Writes lines of text to the specified file using the specified character encoding.

WriteLinesAsync(IStorageFile, IEnumerable<String>)

Writes lines of text to the specified file.

public:
 static IAsyncAction ^ WriteLinesAsync(IStorageFile ^ file, IIterable<Platform::String ^> ^ lines);
 static IAsyncAction WriteLinesAsync(IStorageFile const & file, IIterable<winrt::hstring> const & lines);
[Windows.Foundation.Metadata.Overload("WriteLinesAsync")]
public static IAsyncAction WriteLinesAsync(IStorageFile file, IEnumerable<string> lines);
function writeLinesAsync(file, lines)
Public Shared Function WriteLinesAsync (file As IStorageFile, lines As IEnumerable(Of String)) As IAsyncAction

Parameters

file
IStorageFile

The file that the lines are written to.

lines
IEnumerable<String>

The list of text strings to write as lines.

Returns

IAsyncAction

No object or value is returned when this method completes.

Attributes

Remarks

This method attempts to automatically detect the encoding of a file based on the presence of byte order marks. If an encoding cannot be detected, the encoding specified by the caller is used.

See also

WriteLinesAsync(IStorageFile, IEnumerable<String>, UnicodeEncoding)

Writes lines of text to the specified file using the specified character encoding.

public:
 static IAsyncAction ^ WriteLinesAsync(IStorageFile ^ file, IIterable<Platform::String ^> ^ lines, UnicodeEncoding encoding);
 static IAsyncAction WriteLinesAsync(IStorageFile const & file, IIterable<winrt::hstring> const & lines, UnicodeEncoding encoding);
[Windows.Foundation.Metadata.Overload("WriteLinesWithEncodingAsync")]
public static IAsyncAction WriteLinesAsync(IStorageFile file, IEnumerable<string> lines, UnicodeEncoding encoding);
function writeLinesAsync(file, lines, encoding)
Public Shared Function WriteLinesAsync (file As IStorageFile, lines As IEnumerable(Of String), encoding As UnicodeEncoding) As IAsyncAction

Parameters

file
IStorageFile

The file that the lines are written to.

lines
IEnumerable<String>

The list of text strings to write as lines.

encoding
UnicodeEncoding

The character encoding of the file.

Returns

IAsyncAction

No object or value is returned when this method completes.

Attributes

See also

Applies to