在C#中,Vector 并不是一个内置的集合类型
int index = vector.IndexOf(item);
true;否则返回 false。bool containsItem = vector.Contains(item);
default(T)。T foundItem = vector.Find(x => x.Property == value);
List<T>,其中包含满足条件的所有元素。List<T> foundItems = vector.FindAll(x => x.Property == value);
int foundIndex = vector.FindIndex(x => x.Property == value);
true;否则返回 false。bool exists = vector.Exists(x => x.Property == value);
请注意,这些示例代码假设你已经创建了一个名为 vector 的 List<T> 实例,并且 T 是你要存储在列表中的对象类型。你需要将 item、value 和 T 替换为实际的值和类型。