Skip to content

Commit 33e38c0

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

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
@@ -154,7 +154,7 @@
154154
155155
:::code language="csharp" source="~/snippets/csharp/System/NullReferenceException/Overview/example3.cs" id="Snippet12":::
156156
157-
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/).
157+
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/).
158158
159159
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`.
160160

0 commit comments

Comments
 (0)