Skip to main content
๐Ÿ› Bug HuntC# C# / .NET Easyโšก+10 XP

Null Reference

This throws NullReferenceException.

๐Ÿ› Find the bug
1string name = null;
2Console.WriteLine(name.Length);
๐Ÿ› The bug is on line 2

๐Ÿ”ง Select the correct fix: