I want to check whether the ip is DC or DR. I’m storing the starting of IP address as a array which should be DC or DR.
Now i have to compare the string IP with stored Dc/Dr array.
How do i do it in IF conditions without using for loop.
I tried string.StartsWith(stringArray) but it does not work.
If starts with DC OR DR and my first glance you always checking for the first start of the two character.Try to use the left functions to get the two start value and check if =“DC” or “DR” @kishore.shetty
No, it varies sometime it is 6 characters sometime 10
@kishore.shetty Can i see the data ? Thanks
stringContainsArray.xaml (6.4 KB)
if condition: strArr.ToList.Any(Function(x) inputIP.StartsWith(x))
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.