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

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

DownloadStringCompletedEventArgs.Result プロパティ

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

DownloadStringAsync メソッドによってダウンロードされたデータ取得します

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

解説解説

このプロパティによって返されるデータ使用する前にError プロパティおよび Cancelled プロパティ確認する必要がありますError プロパティの値が Exception オブジェクトであるか、Cancelled プロパティの値が true である場合は、非同期操作適切に完了していないため、Result プロパティの値は有効ではありません。

使用例使用例

このプロパティの値を表示するコード例次に示します

Public Shared Sub DownloadStringCallback2(ByVal
 sender As Object, ByVal
 e As DownloadStringCompletedEventArgs)

    '  If the request was not canceled and did not throw
    '  an exception, display the resource.
    If e.Cancelled = False AndAlso
 e.Error Is Nothing Then

        Dim textString As String
 = CStr(e.Result)
        Console.WriteLine(textString)
    End If
End Sub

public static void DownloadStringCallback2
 (Object sender, DownloadStringCompletedEventArgs e)
{
    // If the request was not canceled and did not throw
    // an exception, display the resource.
    if (!e.Cancelled && e.Error == null)
    {
        string textString = (string)e.Result;

        Console.WriteLine (textString);
    }
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DownloadStringCompletedEventArgs クラス
DownloadStringCompletedEventArgs メンバ
System.Net 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からDownloadStringCompletedEventArgs.Result プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDownloadStringCompletedEventArgs.Result プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDownloadStringCompletedEventArgs.Result プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

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

   

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



DownloadStringCompletedEventArgs.Result プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS