Base Module: Extension Methods ergänzt
This commit is contained in:
parent
180642bfb9
commit
cf2e2161cf
@ -65,6 +65,30 @@ Public Module ModuleExtensions
|
||||
Return (pString.Trim().ToLower() = "true") OrElse (pString.Trim() = "1")
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Checks if a string is null or empty
|
||||
''' </summary>
|
||||
''' <param name="pString">The input string</param>
|
||||
''' <returns>True string is null or empty, otherwise false.</returns>
|
||||
<Extension()>
|
||||
Public Function IsNullOrEmpty(pString As String) As Boolean
|
||||
Return String.IsNullOrEmpty(pString)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Checks if a string is NOT null or empty
|
||||
''' </summary>
|
||||
''' <param name="pString">The input string</param>
|
||||
''' <returns>True string is null or empty, otherwise false.</returns>
|
||||
<Extension()>
|
||||
Public Function IsNotNullOrEmpty(pString As String) As Boolean
|
||||
If String.IsNullOrEmpty(pString) Then
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
' ======================================================
|
||||
' === DICTIONARY
|
||||
' ======================================================
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user