DownloadProgressChangedEventArgs.TotalBytesToReceive プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DownloadProgressChangedEventArgs.TotalBytesToReceive プロパティの意味・解説 

DownloadProgressChangedEventArgs.TotalBytesToReceive プロパティ

メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。

WebClient のデータのダウンロード操作の総バイト数を取得します。

名前空間: System.Net
アセンブリ: System (system.dll 内)
構文構文

Public ReadOnly Property
 TotalBytesToReceive As Long
Dim instance As DownloadProgressChangedEventArgs
Dim value As Long

value = instance.TotalBytesToReceive
public long TotalBytesToReceive { get; }
public:
property long long TotalBytesToReceive {
    long long get ();
}
/** @property */
public long get_TotalBytesToReceive ()
public function get TotalBytesToReceive
 () : long

プロパティ値
受信するバイト数を示す Int64 値。

解説解説

既に受信したバイト数を確認するには、BytesReceived プロパティを使用します。

転送が完了している割合を確認するには、ProgressPercentage プロパティを使用します。

使用例使用例

DownloadProgressChanged イベントのハンドラを実装するコード例を次に示します。メソッドでこのプロパティの値を表示します。

Shared Sub UploadProgressCallback(ByVal
 sender As Object, ByVal
 e As UploadProgressChangedEventArgs)

    '  Displays the operation identifier, and the transfer progress.
    Console.WriteLine("{0}    uploaded {1} of {2} bytes. {3} %
 complete...", _
     CStr(e.UserState), e.BytesSent, e.TotalBytesToSend, e.ProgressPercentage)
End Sub
Shared Sub DownloadProgressCallback(ByVal
 sender As Object, ByVal
 e As DownloadProgressChangedEventArgs)

    '  Displays the operation identifier, and the transfer progress.
    Console.WriteLine("0}    downloaded 1} of 2} bytes. 3} % complete...",
 _
     CStr(e.UserState), e.BytesReceived, e.TotalBytesToReceive, e.ProgressPercentage)
End Sub
static void UploadProgressCallback(object sender,
 UploadProgressChangedEventArgs e)
{
    // Displays the operation identifier, and the transfer progress.
    Console.WriteLine("{0}    uploaded {1} of {2} bytes. {3} % complete...",
 
        (string)e.UserState, 
        e.BytesSent, 
        e.TotalBytesToSend,
        e.ProgressPercentage);
}
static void DownloadProgressCallback(object
 sender, DownloadProgressChangedEventArgs e)
{
    // Displays the operation identifier, and the transfer progress.
    Console.WriteLine("{0}    downloaded {1} of {2} bytes. {3} % complete...",
 
        (string)e.UserState, 
        e.BytesReceived, 
        e.TotalBytesToReceive,
        e.ProgressPercentage);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DownloadProgressChangedEventArgs クラス
DownloadProgressChangedEventArgs メンバ
System.Net 名前空間



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

DownloadProgressChangedEventArgs.TotalBytesToReceive プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DownloadProgressChangedEventArgs.TotalBytesToReceive プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS