Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (91 sloc) 5.67 KB
<Type Name="DownloadDataCompletedEventArgs" FullName="System.Net.DownloadDataCompletedEventArgs">
<TypeSignature Language="C#" Value="public class DownloadDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DownloadDataCompletedEventArgs extends System.ComponentModel.AsyncCompletedEventArgs" />
<TypeSignature Language="DocId" Value="T:System.Net.DownloadDataCompletedEventArgs" />
<TypeSignature Language="VB.NET" Value="Public Class DownloadDataCompletedEventArgs&#xA;Inherits AsyncCompletedEventArgs" />
<TypeSignature Language="C++ CLI" Value="public ref class DownloadDataCompletedEventArgs : System::ComponentModel::AsyncCompletedEventArgs" />
<TypeSignature Language="F#" Value="type DownloadDataCompletedEventArgs = class&#xA; inherit AsyncCompletedEventArgs" />
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.WebClient</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.AsyncCompletedEventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides data for the <see cref="E:System.Net.WebClient.DownloadDataCompleted" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Instances of this class are passed to the <xref:System.Net.DownloadDataCompletedEventHandler>.
## Examples
The following code example demonstrates downloading a user-specified resource.
[!code-cpp[NCLWebClientAsync#21](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#21)]
[!code-csharp[NCLWebClientAsync#21](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLWebClientAsync/CS/asyncmethods.cs#21)]
[!code-vb[NCLWebClientAsync#21](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb#21)]
The following method is called when the download completes.
[!code-cpp[NCLWebClientAsync#22](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#22)]
[!code-csharp[NCLWebClientAsync#22](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLWebClientAsync/CS/asyncmethods.cs#22)]
[!code-vb[NCLWebClientAsync#22](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb#22)]
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="Result">
<MemberSignature Language="C#" Value="public byte[] Result { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance unsigned int8[] Result" />
<MemberSignature Language="DocId" Value="P:System.Net.DownloadDataCompletedEventArgs.Result" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Result As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property cli::array &lt;System::Byte&gt; ^ Result { cli::array &lt;System::Byte&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Result : byte[]" Usage="System.Net.DownloadDataCompletedEventArgs.Result" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.WebClient</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the data that is downloaded by a <see cref="Overload:System.Net.WebClient.DownloadDataAsync" /> method.</summary>
<value>A <see cref="T:System.Byte" /> array that contains the downloaded data.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You should check the <xref:System.ComponentModel.AsyncCompletedEventArgs.Error%2A> and <xref:System.ComponentModel.AsyncCompletedEventArgs.Cancelled%2A> properties before using the data that is returned by this property. If the <xref:System.ComponentModel.AsyncCompletedEventArgs.Error%2A> property's value is an <xref:System.Exception> object or the <xref:System.ComponentModel.AsyncCompletedEventArgs.Cancelled%2A> property's value is `true`, the asynchronous operation did not complete correctly and the <xref:System.Net.DownloadDataCompletedEventArgs.Result%2A> property's value will not be valid.
## Examples
The following code example displays the value of this property.
[!code-cpp[NCLWebClientAsync#22](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLWebClientAsync/CPP/asyncmethods.cpp#22)]
[!code-csharp[NCLWebClientAsync#22](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLWebClientAsync/CS/asyncmethods.cs#22)]
[!code-vb[NCLWebClientAsync#22](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLWebClientAsync/VB/asyncmethods.vb#22)]
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.