We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f9fa6a commit 8ddebe8Copy full SHA for 8ddebe8
snippets/csharp/System/NullReferenceException/Overview/example3.cs
@@ -9,7 +9,7 @@ public class NullReferenceExample
9
public static void Main()
10
{
11
var listType = GetListType();
12
- var listObj = GetList(listType);
+ _ = GetList(listType);
13
}
14
15
private static Type GetListType()
@@ -29,5 +29,5 @@ private static IList GetList(Type type)
29
// Unhandled Exception: System.NullReferenceException: 'Object reference
30
// not set to an instance of an object.'
31
// at System.Collections.Generic.List`1.System.Collections.IList.Add(Object item)
32
-// at Example.GetList(Type type): line 24
+// at NullReferenceExample.GetList(Type type): line 24
33
// </Snippet12>
0 commit comments