WriteBytesAsync() 공개 정적인 메소드

public static WriteBytesAsync ( [ file, [ buffer ) : IAsyncAction
file [
buffer [
리턴 IAsyncAction
예제 #1
0
        private static async Task WriteBytesTaskAsync(string path, byte[] buffer, CancellationToken cancellationToken)
        {
            if (path is null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            var file = await StorageFile.GetFileFromPathAsync(path);

            await FileIO.WriteBytesAsync(file, buffer).AsTask(cancellationToken);
        }
 async public static Task WriteBytesAsync(this StorageFile file, byte[] buffer)
 {
     await FileIO.WriteBytesAsync(file, buffer);
 }