Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Commit 71b6c01

Browse files
committed
Modify Exception.ToString() to use the (virtual) Message property
Previously, if a class that inherited from Exception overrode the Message property, ToString would ignore the value of that overridden property when generating its result.
1 parent cd5f083 commit 71b6c01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Framework/Subset_of_CorLib/System/Exception.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public extern virtual String StackTrace
5858

5959
public override String ToString()
6060
{
61-
String message = _message;
61+
String message = Message;
6262
String s = base.ToString();
6363

6464
if (message != null && message.Length > 0)

0 commit comments

Comments
 (0)