-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathIAsyncResult.xml
383 lines (345 loc) · 27.3 KB
/
IAsyncResult.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<Type Name="IAsyncResult" FullName="System.IAsyncResult">
<TypeSignature Language="C#" Value="public interface IAsyncResult" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IAsyncResult" FrameworkAlternate="dotnet-uwp-10.0;net-5.0;net-6.0;net-7.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.6.2-pp;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-1.0;netstandard-1.1;netstandard-1.2;netstandard-1.3;netstandard-1.4;netstandard-1.5;netstandard-1.6;netstandard-2.0;netstandard-2.1" />
<TypeSignature Language="DocId" Value="T:System.IAsyncResult" />
<TypeSignature Language="VB.NET" Value="Public Interface IAsyncResult" />
<TypeSignature Language="F#" Value="type IAsyncResult = interface" />
<TypeSignature Language="C++ CLI" Value="public interface class IAsyncResult" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IAsyncResult" FrameworkAlternate="net-10.0;net-8.0;net-9.0" />
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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>
<TypeForwardingChain>
<TypeForwarding From="mscorlib" FromVersion="4.0.0.0" To="System.Runtime" ToVersion="0.0.0.0" FrameworkAlternate="dotnet-uwp-10.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="10.0.0.0" FrameworkAlternate="net-10.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="5.0.0.0" FrameworkAlternate="net-5.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="6.0.0.0" FrameworkAlternate="net-6.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="7.0.0.0" FrameworkAlternate="net-7.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Runtime" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
<TypeForwarding From="System.Runtime" FromVersion="4.1.1.1" To="mscorlib" ToVersion="4.0.0.0" FrameworkAlternate="netframework-4.6.2-pp" />
</TypeForwardingChain>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Runtime.InteropServices.ComVisible(true)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.InteropServices.ComVisible(true)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents the status of an asynchronous operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.IAsyncResult> interface is implemented by classes containing methods that can operate asynchronously. It is the return type of methods that initiate an asynchronous operation, such as <xref:System.IO.FileStream.BeginRead%2A?displayProperty=nameWithType>, and it is passed to methods that conclude an asynchronous operation, such as <xref:System.IO.FileStream.EndRead%2A?displayProperty=nameWithType>. <xref:System.IAsyncResult> objects are also passed to methods invoked by <xref:System.AsyncCallback> delegates when an asynchronous operation completes.
An object that supports the <xref:System.IAsyncResult> interface stores state information for an asynchronous operation and provides a synchronization object to allow threads to be signaled when the operation completes.
> [!NOTE]
> The <xref:System.Runtime.Remoting.Messaging.AsyncResult> class is the implementation of <xref:System.IAsyncResult> that is returned by the `BeginInvoke` method when you use a delegate to call a method asynchronously.
For a detailed description of how the <xref:System.IAsyncResult> interface is used, see the [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously) topic.
## Examples
The following example demonstrates how to use the <xref:System.Runtime.Remoting.Messaging.AsyncResult.AsyncWaitHandle%2A> property to get a <xref:System.Threading.WaitHandle>, and how to wait for an asynchronous call on a delegate. The <xref:System.Threading.WaitHandle> is signaled when the asynchronous call completes, and you can wait for it by calling the <xref:System.Threading.WaitHandle.WaitOne%2A> method.
The example consists of two classes: the class that contains the method that is called asynchronously, and the class that contains the `Main` method that makes the call.
For more information and more examples of calling methods asynchronously by using delegates, see [Calling Synchronous Methods Asynchronously](/dotnet/standard/asynchronous-programming-patterns/calling-synchronous-methods-asynchronously).
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncDelegateExamples/cpp/TestMethod.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/IAsyncResult/Overview/TestMethod.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDelegateExamples/VB/TestMethod.vb" id="Snippet1":::
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncDelegateExamples/cpp/waithandle.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/IAsyncResult/Overview/waithandle.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDelegateExamples/VB/WaitHandle.vb" id="Snippet3":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="AsyncState">
<MemberSignature Language="C#" Value="public object AsyncState { get; }" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-1.0;netstandard-1.1;netstandard-1.2;netstandard-1.3;netstandard-1.4;netstandard-1.5;netstandard-1.6;netstandard-2.0;netstandard-2.1" />
<MemberSignature Language="ILAsm" Value=".property instance object AsyncState" />
<MemberSignature Language="DocId" Value="P:System.IAsyncResult.AsyncState" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AsyncState As Object" />
<MemberSignature Language="F#" Value="member this.AsyncState : obj" Usage="System.IAsyncResult.AsyncState" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Object ^ AsyncState { System::Object ^ get(); };" />
<MemberSignature Language="C#" Value="public object? AsyncState { get; }" FrameworkAlternate="net-10.0;net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-3.0;netcore-3.1;netframework-4.6.2-pp" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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>
<Attributes>
<Attribute FrameworkAlternate="net-10.0;net-8.0;net-9.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a user-defined object that qualifies or contains information about an asynchronous operation.</summary>
<value>A user-defined object that qualifies or contains information about an asynchronous operation.</value>
<remarks>
<format type="text/markdown"><.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncDelegateExamples/cpp/TestMethod.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/IAsyncResult/Overview/TestMethod.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDelegateExamples/VB/TestMethod.vb" id="Snippet1":::
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncDelegateExamples/cpp/callback.cpp" id="Snippet5":::
:::code language="csharp" source="~/snippets/csharp/System/IAsyncResult/Overview/callback.cs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDelegateExamples/VB/callback.vb" id="Snippet5":::
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>Implement this property to allow the caller of an asynchronous operation to obtain an application-defined object specified at the start of the operation.</para>
</block>
<block subset="none" type="usage">
<para>This object can be used to pass state information for the asynchronous operation to an <see cref="T:System.AsyncCallback" /> that you provide.</para>
</block>
<altmember cref="T:System.AsyncCallback" />
</Docs>
</Member>
<Member MemberName="AsyncWaitHandle">
<MemberSignature Language="C#" Value="public System.Threading.WaitHandle AsyncWaitHandle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Threading.WaitHandle AsyncWaitHandle" />
<MemberSignature Language="DocId" Value="P:System.IAsyncResult.AsyncWaitHandle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AsyncWaitHandle As WaitHandle" />
<MemberSignature Language="F#" Value="member this.AsyncWaitHandle : System.Threading.WaitHandle" Usage="System.IAsyncResult.AsyncWaitHandle" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Threading::WaitHandle ^ AsyncWaitHandle { System::Threading::WaitHandle ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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>
<ReturnValue>
<ReturnType>System.Threading.WaitHandle</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Threading.WaitHandle" /> that is used to wait for an asynchronous operation to complete.</summary>
<value>A <see cref="T:System.Threading.WaitHandle" /> that is used to wait for an asynchronous operation to complete.</value>
<remarks>
<format type="text/markdown"><.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncDelegateExamples/cpp/TestMethod.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/IAsyncResult/Overview/TestMethod.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDelegateExamples/VB/TestMethod.vb" id="Snippet1":::
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncDelegateExamples/cpp/waithandle.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/IAsyncResult/Overview/waithandle.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDelegateExamples/VB/WaitHandle.vb" id="Snippet3":::
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The object that implements <see cref="T:System.IAsyncResult" /> does not need to create the <see cref="T:System.Threading.WaitHandle" /> until the <see cref="P:System.IAsyncResult.AsyncWaitHandle" /> property is read. It is the choice of the <see cref="T:System.IAsyncResult" /> implementer. However, if the implementer creates <see cref="P:System.IAsyncResult.AsyncWaitHandle" />, it is the responsibility of the implementer to signal the <see cref="T:System.Threading.WaitHandle" /> that will terminate the wait at the appropriate time. For example, <see cref="T:System.Runtime.Remoting.Messaging.AsyncResult" /> terminates the wait on behalf of the caller when an asynchronously invoked method returns. Once created, <see cref="P:System.IAsyncResult.AsyncWaitHandle" /> should be kept alive until the user calls the method that concludes the asynchronous operation. At that time the object behind <see cref="P:System.IAsyncResult.AsyncWaitHandle" /> can be discarded.</para>
</block>
<block subset="none" type="usage">
<para>Clients that wait for the operation to complete (as opposed to polling) use this property to obtain a synchronization object to wait on.</para>
<para>Note: When you use the <see langword="BeginInvoke" /> method of a delegate to call a method asynchronously and obtain a wait handle from the resulting <see cref="T:System.IAsyncResult" />, we recommend that you close the wait handle as soon as you are finished using it, by calling the <see cref="M:System.Threading.WaitHandle.Close" /> method. If you simply release all references to the wait handle, system resources are freed when garbage collection reclaims the wait handle, but garbage collection works more efficiently when disposable objects are explicitly closed or disposed. For more information, see the <see cref="P:System.Runtime.Remoting.Messaging.AsyncResult.AsyncWaitHandle" /> property.</para>
</block>
</Docs>
</Member>
<Member MemberName="CompletedSynchronously">
<MemberSignature Language="C#" Value="public bool CompletedSynchronously { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CompletedSynchronously" />
<MemberSignature Language="DocId" Value="P:System.IAsyncResult.CompletedSynchronously" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CompletedSynchronously As Boolean" />
<MemberSignature Language="F#" Value="member this.CompletedSynchronously : bool" Usage="System.IAsyncResult.CompletedSynchronously" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool CompletedSynchronously { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the asynchronous operation completed synchronously.</summary>
<value>
<see langword="true" /> if the asynchronous operation completed synchronously; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the synchronous completion of the call is detected in the <xref:System.AsyncCallback> delegate, it is probable that the thread that initiated the asynchronous operation is the current thread.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>Most implementers of the <see cref="T:System.IAsyncResult" /> interface will not use this property and should return <see langword="false" />. Beginning with the .NET Framework 4.5, a task that is created with the <see cref="M:System.Threading.Tasks.TaskFactory.FromAsync(System.IAsyncResult,System.Action{System.IAsyncResult},System.Threading.Tasks.TaskCreationOptions)" /> method will not complete if this property is not implemented correctly. See <see href="/dotnet/framework/migration-guide/application-compatibility-in-the-net-framework-4-5">Application Compatibility in 4.5</see>.</para>
</block>
<block subset="none" type="usage">
<para>Use this property to determine if the asynchronous operation completed synchronously. For example, this property can return <see langword="true" /> for an asynchronous I/O operation if the I/O request was small.</para>
</block>
</Docs>
</Member>
<Member MemberName="IsCompleted">
<MemberSignature Language="C#" Value="public bool IsCompleted { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsCompleted" />
<MemberSignature Language="DocId" Value="P:System.IAsyncResult.IsCompleted" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsCompleted As Boolean" />
<MemberSignature Language="F#" Value="member this.IsCompleted : bool" Usage="System.IAsyncResult.IsCompleted" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsCompleted { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<AssemblyVersion>4.2.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<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>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the asynchronous operation has completed.</summary>
<value>
<see langword="true" /> if the operation is complete; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><.
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncDelegateExamples/cpp/TestMethod.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/IAsyncResult/Overview/TestMethod.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDelegateExamples/VB/TestMethod.vb" id="Snippet1":::
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncDelegateExamples/cpp/polling.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System/IAsyncResult/Overview/polling.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDelegateExamples/VB/polling.vb" id="Snippet4":::
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>Implementers will typically return the value of a private field or internal test as the value of this property.</para>
</block>
<block subset="none" type="usage">
<para>Clients that poll for operation status (as opposed to waiting on a synchronization object) use this property to determine the status of the operation.</para>
</block>
</Docs>
</Member>
</Members>
</Type>