I would like to force a null reference exception at line 3. An exception is not occurring? I am trying to test some ideas for more secure code, as null reference frequently occurs during our scans. So how would I force a null reference exception at line 3 for strTest which is passed in by reference?
1 Private Sub GetStuff(ByRef strTest As String)
2 strTest = Nothing
3 Dim k As String = strTest
4 End Sub