borderAndreaVB free resources for Visual Basic developersborder

AndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincani
:: Check for IsNull/IsEmpty or = ""

Author  

Jemima Chadwick

Language  

VB5, VB6

Operating Systems  

Windows 95, 98, NT, Me and 2k
Tip
'Most of the time, it is difficult to trace and differentiate the check for IsNull(value) 
'or IsEmpty(value) or (value = "").

'We end up writing code that would satisfy all the three by including all the three checks.
'This can be achieved by concatenating "" to the value and check if it is equal to "".
'I mean, 

(value & "") = ""

'This is a simple yet useful programming tip that I have encountered for basic 
'validation in developing projects.
:: Navigation

Home

Beginners Corner

Previous Tip

Next Tip

:: Search this site
Google
Partners: Il portale per lui e lei | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder