Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use of question mark in parameters
Message
From
07/11/2011 16:46:01
 
 
To
07/11/2011 16:14:11
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01528240
Message ID:
01528313
Views:
52
>I'd use the string.IsNullOrEmpty() method instead:
>
>
>        Public Function GetNonNullable(ByVal tcValue As String) As String
>            Dim lcValue As String= ""
>
>            ' If we have a value
>            If Not string.IsNullOrEmpty(tcValue) Then
>                lcValue = tcValue
>            End If
>
>            Return lcValue
>        End Function
>
Declaration already has the variable set to empty. I initialize all my declarations to empty values. So, the only check needed after is to make sure it is not null to put the value in it. That will be in the condition. But, thanks for an alternative way to do it.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform