Skip to content

Commit 30a0c88

Browse files
Mention option of passing null as message parameter for FileNotFoundException
From the current documentation it is not easy to discover that it is possible to get a system-supplied error message containing a provided file name by passing null to the message parameter of the FileNotFoundException constructor. It is mentioned in the Message property, but I only found that when creating this pull request.
1 parent d85b489 commit 30a0c88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xml/System.IO/FileNotFoundException.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
<Parameter Name="fileName" Type="System.String" />
313313
</Parameters>
314314
<Docs>
315-
<param name="message">A description of the error. The content of <paramref name="message" /> is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.</param>
315+
<param name="message">A description of the error, or null to use a system-supplied message with the given <paramref name="fileName" />. The content of <paramref name="message" /> is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.</param>
316316
<param name="fileName">The full name of the file with the invalid image.</param>
317317
<summary>Initializes a new instance of the <see cref="T:System.IO.FileNotFoundException" /> class with a specified error message, and the file name that cannot be found.</summary>
318318
<remarks>
@@ -653,4 +653,4 @@
653653
</Docs>
654654
</Member>
655655
</Members>
656-
</Type>
656+
</Type>

0 commit comments

Comments
 (0)