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

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
posted on 2006-09-26 09:11  kenty  阅读(620)  评论(0编辑  收藏  举报