A
Alan Roberts
In VB6 I had a function that tested whether an array had any items in it as
follows
Public Function ArrayIsEmpty(TestVar As Variant) As Boolean
On Error Resume Next
Dim i As Long
i = UBound(TestVar, 1)
If Err.Number = 0 Then
ArrayIsEmpty = False
Else
ArrayIsEmpty = True
End If
End Function
I used a variant becaus I couldn't be sure what type of variable would be
passed to the routing (eg a string array, int array, object array etc etc.
How can I duplicate this functionality in Csharp?
Thanks
Alan
follows
Public Function ArrayIsEmpty(TestVar As Variant) As Boolean
On Error Resume Next
Dim i As Long
i = UBound(TestVar, 1)
If Err.Number = 0 Then
ArrayIsEmpty = False
Else
ArrayIsEmpty = True
End If
End Function
I used a variant becaus I couldn't be sure what type of variable would be
passed to the routing (eg a string array, int array, object array etc etc.
How can I duplicate this functionality in Csharp?
Thanks
Alan