Skip to content

Commit 537cbf6

Browse files
hawkeye101gewarren
authored andcommitted
Update xml/System/NullReferenceException.xml (pull req suggestion)
Co-authored-by: Genevieve Warren <[email protected]>
1 parent cbae522 commit 537cbf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System/NullReferenceException.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
156156
:::code language="csharp" source="~/snippets/csharp/System/NullReferenceException/Overview/example3.cs" id="Snippet12":::
157157
158-
To address this issue, make sure that the list is initialized (one way to do this is to call `Activator.CreateInstance` method instead of `FormatterServices.GetUninitializedObject`), or handle the thrown exception in a `try…catch…finally` block. For more information, see [Exceptions](/dotnet/standard/exceptions/).
158+
To address this issue, make sure that the list is initialized (one way to do this is to call `Activator.CreateInstance` instead of `FormatterServices.GetUninitializedObject`), or handle the thrown exception in a `try…catch…finally` block. For more information, see [Exceptions](/dotnet/standard/exceptions/).
159159
160160
The following Microsoft intermediate language (MSIL) instructions throw <xref:System.NullReferenceException>: `callvirt`, `cpblk`, `cpobj`, `initblk`, `ldelem.<type>`, `ldelema`, `ldfld`, `ldflda`, `ldind.<type>`, `ldlen`, `stelem.<type>`, `stfld`, `stind.<type>`, `throw`, and `unbox`.
161161

0 commit comments

Comments
 (0)