[RESOLVED] C# to vb translation of != null
Hi
I'm trying to translate a bit of text:
Code:
if (connection_string_read_from_web.config != null)
(.....create a dataset.....)
return null;
This tests to see if there's a string in the variable (connection string) and if not, it returns null.
How do I return 'null' in vb? Would I return DBNull.value?
Re: C# to vb translation of != null
Hi there,
Code:
If whateveryouaretesting IsNot Nothing Then
' Do something
End If
Re: C# to vb translation of != null
nmadd
A big thanks! Nothing is exactly what I needed.
Changed the function to: return nothing
Now the Gridview's EmptyDataText displays just fine if there's a problem in the Try Catch. :)