Skip to content

Commit e044d98

Browse files
fix sentence for standalone discard with Task (#48663)
* fix Standalone discard with Task sentence * make changes from feedback
1 parent e02f74e commit e044d98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/fundamentals/functional/discards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ You can use a standalone discard to indicate any variable that you choose to ign
5757

5858
:::code language="csharp" source="snippets/discards/standalone-discard1.cs" ID="ArgNullCheck" :::
5959

60-
The following example uses a standalone discard to ignore the <xref:System.Threading.Tasks.Task> object returned by an asynchronous operation. Assigning the task has the effect of suppressing the exception that the operation throws as it is about to complete. It makes your intent clear: You want to discard the `Task`, and ignore any errors generated from that asynchronous operation.
60+
The following example uses a standalone discard to ignore the <xref:System.Threading.Tasks.Task> object returned by an asynchronous operation. Assigning the task has the effect of suppressing the compiler warning about unobserved exceptions. It makes your intent clear: You want to discard the `Task`, and propagate any errors generated from that asynchronous operation to callers.
6161

6262
:::code language="csharp" source="snippets/discards/standalone-discard1.cs" ID="SnippetDiscardTask" :::
6363

0 commit comments

Comments
 (0)