Using VB.NET IIF I get NullReferenceException

IIf is an actual function, so all arguments get evaluated. The If keyword was added to VB.NET 2008 to provide the short-circuit functionality you’re expecting.

Try

logLine = "e.Value: " + If(e.Value Is Nothing, "", e.Value.ToString())

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)