判斷某個值是否在數組中

判斷某個值是否在數組中 string MobilNumer="123"; string[] Super_Master_num={"123","456","789"}; if (Array.IndexOf(Super_Master_num, MobilNumer) != -1)// { //存在 } else { //不存在 }
發佈了27 篇原創文章 · 獲贊 3 · 訪問量 9萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章