FileIO.ReadTextAsync FileIO.ReadTextAsync FileIO.ReadTextAsync FileIO.ReadTextAsync FileIO.ReadTextAsync Method

Definition

Overloads

ReadTextAsync(IStorageFile) ReadTextAsync(IStorageFile) ReadTextAsync(IStorageFile) ReadTextAsync(IStorageFile) ReadTextAsync(IStorageFile)

Reads the contents of the specified file and returns text.

ReadTextAsync(IStorageFile, UnicodeEncoding) ReadTextAsync(IStorageFile, UnicodeEncoding) ReadTextAsync(IStorageFile, UnicodeEncoding) ReadTextAsync(IStorageFile, UnicodeEncoding) ReadTextAsync(IStorageFile, UnicodeEncoding)

Reads the contents of the specified file using the specified character encoding and returns text.

ReadTextAsync(IStorageFile) ReadTextAsync(IStorageFile) ReadTextAsync(IStorageFile) ReadTextAsync(IStorageFile) ReadTextAsync(IStorageFile)

Reads the contents of the specified file and returns text.

public : static IAsyncOperation<Platform::String> ReadTextAsync(IStorageFile file)
static IAsyncOperation<winrt::hstring> ReadTextAsync(IStorageFile file) const;
public static IAsyncOperation<string> ReadTextAsync(IStorageFile file)
Public Shared Function ReadTextAsync(file As IStorageFile) As IAsyncOperation(Of string)
Windows.Storage.FileIO.readTextAsync(file).done( /* Your success and error handlers */ );
Parameters
file
IStorageFile IStorageFile IStorageFile

The file to read.

Returns

When this method completes successfully, it returns the contents of the file as a text string.

Remarks

Any object that implements the IStorageFile interface may be passed to this method or its overload through the file parameter.

This method uses the character encoding of the specified file. If you want to specify different encoding, call ReadTextAsync(IStorageFile, UnicodeEncoding) instead.

See Also

ReadTextAsync(IStorageFile, UnicodeEncoding) ReadTextAsync(IStorageFile, UnicodeEncoding) ReadTextAsync(IStorageFile, UnicodeEncoding) ReadTextAsync(IStorageFile, UnicodeEncoding) ReadTextAsync(IStorageFile, UnicodeEncoding)

Reads the contents of the specified file using the specified character encoding and returns text.

public : static IAsyncOperation<Platform::String> ReadTextAsync(IStorageFile file, UnicodeEncoding encoding)
static IAsyncOperation<winrt::hstring> ReadTextAsync(IStorageFile file, UnicodeEncoding encoding) const;
public static IAsyncOperation<string> ReadTextAsync(IStorageFile file, UnicodeEncoding encoding)
Public Shared Function ReadTextAsync(file As IStorageFile, encoding As UnicodeEncoding) As IAsyncOperation(Of string)
Windows.Storage.FileIO.readTextAsync(file, encoding).done( /* Your success and error handlers */ );
Parameters
file
IStorageFile IStorageFile IStorageFile

The file to read.

encoding
UnicodeEncoding UnicodeEncoding UnicodeEncoding

The character encoding to use.

Returns

When this method completes successfully, it returns the contents of the file as a text string.

See Also