function 'SetMapping' doesn't return a value on all code paths. A null reference exception could occur at run time when the result is usedSource :
Function SetMapping()If you make sure there is nothing to return, change the keyword Function to Sub
Console.WriteLine("do sth")
End Function
Sub SetMapping()
Console.WriteLine("do sth")
End Sub
Reference:
https://stackoverflow.com/questions/52126716/function-start-doesnt-return-a-value-on-all-code-paths-a-null-reference-except
No comments :
Post a Comment