System::Array::BinarySearch method

Array::BinarySearch(System::ArrayPtr<T>, const T&) method

सॉर्टेड एरे में बाइनरी सर्च करता है।

static int System::Array<T>::BinarySearch(System::ArrayPtr<T> arr, const T &item)
पैरामीटरप्रकारविवरण
arrSystem::ArrayPtr<T>सर्च करने के लिए सॉर्टेड एरे
आइटमconst T&खोजने के लिए एक आइटम

ReturnValue

यदि खोजा गया आइटम मिला तो उसका इंडेक्स, अन्यथा एक नकारात्मक पूर्णांक जो खोजे गए आइटम से बड़ा अगला आइटम का इंडेक्स का बिटवाइज़ कॉम्प्लीमेंट है या यदि बड़ा आइटम नहीं है तो एरे में तत्वों की संख्या का बिटवाइज़ कॉम्प्लीमेंट है।

संबंधित देखें

Array::BinarySearch(System::ArrayPtr<T>, const Y&, const SharedPtr<Collections::Generic::IComparer<Z>>&) method

लागू नहीं किया गया।

template<typename Y,typename Z> static int System::Array<T>::BinarySearch(System::ArrayPtr<T> arr, const Y &item, const SharedPtr<Collections::Generic::IComparer<Z>> &comparer)

संबंधित देखें