Skip to content

Commit afe32d1

Browse files
authored
Update how-to-convert-a-string-to-a-number.md
1 parent 70017b2 commit afe32d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/programming-guide/types/how-to-convert-a-string-to-a-number.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ It's slightly more efficient and straightforward to call a `TryParse` method (fo
2121
You use `Parse` or `TryParse` methods on the numeric type you expect the string contains, such as the <xref:System.Int32?displayProperty=nameWithType> type. The <xref:System.Convert.ToInt32%2A?displayProperty=nameWithType> method uses <xref:System.Int32.Parse%2A> internally. The `Parse` method returns the converted number; the `TryParse` method returns a boolean value that indicates whether the conversion succeeded, and returns the converted number in an `out` parameter. If the string isn't in a valid format, `Parse` throws an exception, but `TryParse` returns `false`. When calling a `Parse` method, you should always use exception handling to catch a <xref:System.FormatException> when the parse operation fails.
2222

2323
> [!TIP]
24-
> You can use AI assistance to [convert a string to a number](#use-AI-to-convert-a-string-to-a-number).
24+
> You can use AI assistance to [convert a string to a number](#use-ai-to-convert-a-string-to-a-number).
2525
2626
## Call Parse or TryParse methods
2727

0 commit comments

Comments
 (0)