Skip to content

Commit 8ddebe8

Browse files
authored
Apply suggestions from code review
1 parent 7f9fa6a commit 8ddebe8

File tree

1 file changed

+2
-2
lines changed
  • snippets/csharp/System/NullReferenceException/Overview

1 file changed

+2
-2
lines changed

snippets/csharp/System/NullReferenceException/Overview/example3.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class NullReferenceExample
99
public static void Main()
1010
{
1111
var listType = GetListType();
12-
var listObj = GetList(listType);
12+
_ = GetList(listType);
1313
}
1414

1515
private static Type GetListType()
@@ -29,5 +29,5 @@ private static IList GetList(Type type)
2929
// Unhandled Exception: System.NullReferenceException: 'Object reference
3030
// not set to an instance of an object.'
3131
// at System.Collections.Generic.List`1.System.Collections.IList.Add(Object item)
32-
// at Example.GetList(Type type): line 24
32+
// at NullReferenceExample.GetList(Type type): line 24
3333
// </Snippet12>

0 commit comments

Comments
 (0)