English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hey guys, I'm wondering how I can declare something as null in VB.NET. IN C#.NET, I could just say,

If (liname.text != null)

{

DO SOMETHING

}

In vb.net, however, it tells me the null statement is no longer supported. How would I make a statement in VB.NET 2005 that says if a text string is not null, then do something? Thanks, your help is appreciated.

2007-08-03 18:00:38 · 4 answers · asked by austin 2 in Computers & Internet Programming & Design

4 answers

The keyword you're looking for is 'Nothing'.

If liname.Text IsNot Nothing Then
DoSomething
EndIf

2007-08-03 18:48:22 · answer #1 · answered by Anonymous · 0 0

end whining. balloting by way of racism or being fooled via marketing campaign rhetoric (assuming those issues are actual) are no grounds to null and void an election. in actuality if there became a time wherein a vote recount could have been completed became while Bush won the elections with cheating in Florida; there became sparkling and blatant cheating on that election and Bush don't have won those elections. Now end being a crybaby and get used to Obama; those people who hated Bush for being so stupid had to place up with him for 8 years, it's time you do a similar with the different element's candidate.

2016-12-15 05:20:02 · answer #2 · answered by ? 4 · 0 0

vb is a rather sucky language -- i'd stick with c#/c++.

try if ( liname.text is null )
or
if ( liname.text is nil)

just a guess

2007-08-03 18:04:12 · answer #3 · answered by mdigitale 7 · 0 0

dim "object" as null

2007-08-03 18:30:08 · answer #4 · answered by drea 1 · 0 0

fedest.com, questions and answers