|
-
Jul 26th, 2007, 12:39 PM
#1
Thread Starter
Hyperactive Member
[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?
-
Jul 26th, 2007, 12:49 PM
#2
Re: C# to vb translation of != null
Hi there,
Code:
If whateveryouaretesting IsNot Nothing Then
' Do something
End If
-
Jul 26th, 2007, 01:49 PM
#3
Thread Starter
Hyperactive Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|