From 1020d1c7f1905920ae070f93d0c697dafa3f1cc9 Mon Sep 17 00:00:00 2001 From: Stuart Mosquera Date: Mon, 22 Sep 2025 17:29:02 -0300 Subject: [PATCH 1/2] fix Standalone discard with Task sentence --- docs/csharp/fundamentals/functional/discards.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/fundamentals/functional/discards.md b/docs/csharp/fundamentals/functional/discards.md index 7df3aaf46f043..bfa8094281633 100644 --- a/docs/csharp/fundamentals/functional/discards.md +++ b/docs/csharp/fundamentals/functional/discards.md @@ -57,7 +57,7 @@ You can use a standalone discard to indicate any variable that you choose to ign :::code language="csharp" source="snippets/discards/standalone-discard1.cs" ID="ArgNullCheck" ::: -The following example uses a standalone discard to ignore the 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. +The following example uses a standalone discard to ignore the 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 ignore any errors generated from that asynchronous operation. :::code language="csharp" source="snippets/discards/standalone-discard1.cs" ID="SnippetDiscardTask" ::: From 7bc2fd0295b919151231cabb72506270cfbdf490 Mon Sep 17 00:00:00 2001 From: Stuart Mosquera Date: Tue, 23 Sep 2025 10:40:04 -0300 Subject: [PATCH 2/2] make changes from feedback --- docs/csharp/fundamentals/functional/discards.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/fundamentals/functional/discards.md b/docs/csharp/fundamentals/functional/discards.md index bfa8094281633..34e632203530b 100644 --- a/docs/csharp/fundamentals/functional/discards.md +++ b/docs/csharp/fundamentals/functional/discards.md @@ -57,7 +57,7 @@ You can use a standalone discard to indicate any variable that you choose to ign :::code language="csharp" source="snippets/discards/standalone-discard1.cs" ID="ArgNullCheck" ::: -The following example uses a standalone discard to ignore the 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 ignore any errors generated from that asynchronous operation. +The following example uses a standalone discard to ignore the 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. :::code language="csharp" source="snippets/discards/standalone-discard1.cs" ID="SnippetDiscardTask" :::