System.IO.IsolatedStorage.IsolatedStorageFileStream.Write C# (CSharp) Méthode

Write() public méthode

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
Résultat void
        public override void Write(byte[] buffer, int offset, int count) { }
        public override void WriteByte(byte value) { }

Usage Example

        void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
        {
            if (e.Error == null && !e.Cancelled)
            {
                string iconPath = "1.txt";

                using (var isf = IsolatedStorageFile.GetUserStoreForApplication())
                {
                    var isfs = new IsolatedStorageFileStream(iconPath, FileMode.Create, isf);
                    int bytesRead;
                    byte[] bytes = new byte[e.Result.Length];
                    while ((bytesRead = e.Result.Read(bytes, 0, bytes.Length)) != 0)
                    {
                        isfs.Write(bytes, 0, bytesRead);
                    }
                    isfs.Flush();
                    isfs.Close();
                }


                this.Dispatcher.BeginInvoke(() =>
                {
                    NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
                });
            }
        }
All Usage Examples Of System.IO.IsolatedStorage.IsolatedStorageFileStream::Write