FileIO.WriteTextAsync Methode

Definition

Überlädt

WriteTextAsync(IStorageFile, String)

Schreibt Text in die angegebene Datei.

WriteTextAsync(IStorageFile, String, UnicodeEncoding)

Schreibt Text mithilfe der angegebenen Zeichencodierung in die angegebene Datei.

WriteTextAsync(IStorageFile, String)

Schreibt Text in die angegebene Datei.

public:
 static IAsyncAction ^ WriteTextAsync(IStorageFile ^ file, Platform::String ^ contents);
/// [Windows.Foundation.Metadata.Overload("WriteTextAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncAction WriteTextAsync(IStorageFile const& file, winrt::hstring const& contents);
[Windows.Foundation.Metadata.Overload("WriteTextAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncAction WriteTextAsync(IStorageFile file, string contents);
function writeTextAsync(file, contents)
Public Shared Function WriteTextAsync (file As IStorageFile, contents As String) As IAsyncAction

Parameter

file
IStorageFile

Die Datei, in die der Text geschrieben wird.

contents
String

Platform::String

winrt::hstring

Der zu schreibende Text.

Gibt zurück

Nach Abschluss dieser Methode wird kein Objekt oder Wert zurückgegeben.

Attribute

Hinweise

Diese Methode versucht, die Codierung einer Datei basierend auf dem Vorhandensein von Bytereihenfolgemarken automatisch zu erkennen. Wenn eine Codierung nicht erkannt werden kann, wird die vom Aufrufer angegebene Codierung verwendet.

Weitere Informationen

Gilt für:

WriteTextAsync(IStorageFile, String, UnicodeEncoding)

Schreibt Text mithilfe der angegebenen Zeichencodierung in die angegebene Datei.

public:
 static IAsyncAction ^ WriteTextAsync(IStorageFile ^ file, Platform::String ^ contents, UnicodeEncoding encoding);
/// [Windows.Foundation.Metadata.Overload("WriteTextWithEncodingAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncAction WriteTextAsync(IStorageFile const& file, winrt::hstring const& contents, UnicodeEncoding const& encoding);
[Windows.Foundation.Metadata.Overload("WriteTextWithEncodingAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncAction WriteTextAsync(IStorageFile file, string contents, UnicodeEncoding encoding);
function writeTextAsync(file, contents, encoding)
Public Shared Function WriteTextAsync (file As IStorageFile, contents As String, encoding As UnicodeEncoding) As IAsyncAction

Parameter

file
IStorageFile

Die Datei, in die der Text geschrieben wird.

contents
String

Platform::String

winrt::hstring

Der zu schreibende Text.

encoding
UnicodeEncoding

Die Zeichencodierung der Datei.

Gibt zurück

Nach Abschluss dieser Methode wird kein Objekt oder Wert zurückgegeben.

Attribute

Weitere Informationen

Gilt für: