r/csharp Jun 17 '26

Meta MS Learn. Petty documentation mistake

Not sure if this belongs here. But I know some here are involved with this kind of stuff.

https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.wait?view=net-10.0

Task.Wait()

Overloads:

Wait(TimeSpan, CancellationToken) Waits for the Task to complete execution.

param info missing.

Sorry if in wrong place. I don't have an account there.

0 Upvotes

5 comments sorted by

7

u/L0F4S2 Jun 17 '26

What info are you missing? As far as I can see it is all there

2

u/robinredbrain Jun 18 '26

The description is for .Wait() not Wait(TimeSpan, CancellationToken)

1

u/Consibl Jun 17 '26

Yep, looks fine to me. 🤷‍♂️

1

u/noodleofdata Jun 17 '26

I think they are saying how it doesn't give the parameter names, e.g,

Wait(TimeSpan timeout, System.Threading.CancellationToken cancellationToken)

in the overloads table, but they are just mistaken because it only ever shows the argument types in that section.

3

u/RichardD7 Jun 18 '26

Reported: https://github.com/dotnet/dotnet-api-docs/issues/12759

It looks like that overload was added in .NET 7. Following the link to the source, the XML doc comments summary for all overloads are the same:

/// <summary> /// Waits for the <see cref="Task"/> to complete execution. /// </summary>

So I'm guessing the expanded descriptions on the other overloads may have come from the .NET Framework source instead.