判断一个字符是否在数组中

dim strarr as string()
dim str1 as string
str1="disp"
strarr = New String() {"JR_RegDate", "DC_Rev", "Disp", "SubDisp", "Unit"}
if   array.indexof(strarr,str1)<>-1  then
     'yes
else
    'no
endif
原文地址:https://www.cnblogs.com/kentyshang/p/514843.html