Hi,
I want to check if the array of string called arr1 is empty or null…
I’m using
Arr1 is nothing in the condition and it’s not working fine…
Any idea?
Hi,
I want to check if the array of string called arr1 is empty or null…
I’m using
Arr1 is nothing in the condition and it’s not working fine…
Any idea?
Hi @Ray_Sha1,
Input
Output
String.Join(“”,arrVal) = Nothing
One more condition
String.IsNullOrEmpty(String.Join(“”,arrVal)) or String.IsNullOrWhiteSpace(String.Join(“”,arrVal))
Thanks,
Hello @Ray_Sha1
You can use the below expression:
IsNothing(MyVar)
Else check the below similar post.
Thanks
a very strict approach could
isNothing(yourArrVar) OrElse (Not yourArrVar.Any() ) OrElse yourArrVar.All(Function (x) String.IsNullOrEmpty(x.Trim()))
it will return true when the array is null, having no items or every entry is null or empty.String
Hiiii @Ray_Sha1 you can use arr1.count=0 in condition sooo that you can able to get empty array
Hi all,
All of them are valid solutions.
I just selected one that I’m using as I’ll also verify the null, empty values.
Thanks all
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.