You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Threading.Tasks/Task.xml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3056,7 +3056,7 @@ This method creates a <xref:System.Threading.Tasks.Task%601> object whose <xref:
3056
3056
3057
3057
To create a `Task` object that does not return a value, retrieve the `Task` object from the <xref:System.Threading.Tasks.Task.CompletedTask%2A> property.
3058
3058
3059
-
Starting in .NET 6, for some `T` types and some result values, this method may return a cached singleton object rather than allocating a new object.
3059
+
Starting in .NET 6, for some `TResult` types and some result values, this method may return a cached singleton object rather than allocating a new object.
3060
3060
3061
3061
## Examples
3062
3062
The following example is a command-line utility that calculates the number of bytes in the files in each directory whose name is passed as a command-line argument. Rather than executing a longer code path that instantiates a <xref:System.IO.FileStream> object and retrieves the value of its <xref:System.IO.FileStream.Length%2A?displayProperty=nameWithType> property for each file in the directory, the example simply calls the <xref:System.Threading.Tasks.Task.FromResult%2A> method to create a task whose <xref:System.Threading.Tasks.Task%601.Result%2A?displayProperty=nameWithType> property is zero (0) if a directory has no files.
0 commit comments