dotnet / dotnet/dotnet-api-docs

Incorrect Example

Open
#1,607 0 comments 0 reactions 0 assignees View on GitHub
area-System.DateTime dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

In example above, "24:0:0" is said to return "Parse operation failed". It's incorrect.
It succeeds and returns 24 days ...
As it's definitely an edge-case not behaving as expected (some could have expect 1 day). It's better to document it properly.

See :
https://github.com/dotnet/dotnet-api-docs/blob/7f6a3882631bc008b858adfadb43cd17bbd55d49/xml/System/TimeSpan.xml#L2772

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 26b52684-e2ce-3140-893f-1230bc2eeb3d
* Version Independent ID: 082096cb-4250-a700-725d-c8f99eb96ff8
* Content: [TimeSpan.TryParse Method (System)](https://docs.microsoft.com/en-us/dotnet/api/system.timespan.tryparse?view=netframework-4.7.2)
* Content Source: [xml/System/TimeSpan.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System/TimeSpan.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.