【发布时间】:2025-11-21 12:45:02
【问题描述】:
我有一个从 sql 查询中提取的值列表,以便找出其中是否存在 x 提供的值。
SQL:
-Select null from table where code='x'
-resul.count>0
String:
-Loop for concatenating the codes in one string
-codesstring.Contains("x")
Hashtable:
-Loop for adding the codes to the hashtable
-codeshashtable.ContainsKey("x")
列表将在数千范围内...最快的方法是什么?
【问题讨论】: