Conversation
|
This should also include the extension variant of the methods, which is where it tends to be used. |
|
Thank you for the response. |
|
Thanks for the pull request! Is the primary goal to have versions of those methods that don't ever throw? I notice that the new extraction plan now uses a class's Does anyone know if there are any common types where |
|
A regex-matching text could throw any exception when parsing, e.g. If we are talking about the C# system types, all of those having |
|
I would say to maintain compatibility with user-defined types that use a Parse(string) method, it can look for a TryParse method, and then fallback to the Parse method if one is not found. |
|
Thanks for pointing this out. I'll implement an attempt to |
|
@duydang2311, I converted this to a Draft PR for now. Please mark it as |
Once .NET 7 is available it can also check to see if the type is |
119c99a to
18f8b62
Compare
This PR adds Try-prefixed methods, including:
TryConstruct,TryExecute,TryExtract.