If you need to use a select case statement and you want to determine the value of the first few characters of a string, is there a way to 'include' a range rather than using 'or' statments?
ex:
here, I'm checking for a 'prefix' and it returns an ip address. is there a better way to write that?VB Code:
Select Case true Case Node.StartsWith("N25") Or _ Node.StartsWith("N30") Or _ Node.StartsWith("N35") Or _ Node.StartsWith("N40") Or _ Node.StartsWith("N45") Return "192.168.4.237" Case Node.StartsWith("N55") Or _ Node.StartsWith("N65") Or _ Node.StartsWith("N70") Or _ Node.StartsWith("N50") Return "192.168.4.235" Case Node.StartsWith("N95") Or _ Node.StartsWith("N75") Or _ Node.StartsWith("N80") Or _ Node.StartsWith("N85") Or _ Node.StartsWith("N90") Or _ Node.StartsWith("N100") Or _ Node.StartsWith("N105") Return "192.168.4.239" End Select




Reply With Quote