string[] elements = new string[50];

 if ( Array.IndexOf<string>( elements, "sss" ) != -1 )

{

//存在 //返回的值就是 "sss" 在数组中的下标

}

else

{

//不存在

 }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-07
  • 2021-11-13
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
相关资源
相似解决方案