FileIO.WriteLinesAsync Method

Definition

Overloads

WriteLinesAsync(IStorageFile, IIterable<String>)

Writes lines of text to the specified file.

WriteLinesAsync(IStorageFile, IIterable<String>, UnicodeEncoding)

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

WriteLinesAsync(IStorageFile, IIterable<String>)

Writes lines of text to the specified file.

public:
 static IAsyncAction ^ WriteLinesAsync(IStorageFile ^ file, IIterable<Platform::String ^> ^ lines);
/// [Windows.Foundation.Metadata.Overload("WriteLinesAsync")]
 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

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

The list of text strings to write as lines.

Returns

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

Applies to

WriteLinesAsync(IStorageFile, IIterable<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);
/// [Windows.Foundation.Metadata.Overload("WriteLinesWithEncodingAsync")]
 static IAsyncAction WriteLinesAsync(IStorageFile const& file, IIterable<winrt::hstring> const& lines, UnicodeEncoding const& 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

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

The list of text strings to write as lines.

encoding
UnicodeEncoding

The character encoding of the file.

Returns

No object or value is returned when this method completes.

Attributes

See also

Applies to