TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yogeshmanohar
NA
6
0
Array.BinarySearch does not work
Jan 27 2004 8:22 AM
Hi!! I am having this strange problem. I have a sorted array containing strings. I am iterating through the array and clearing the contents one by one using "array.BinarySearch" to find each element. So far so good. But the moment I come to the last element, the BinarySearch method fails.It gives me a return value which is negative although the element is very much there. I am debugging through the code and I find nothing wrong with it.Note that i am using the first overloaded method of BinarySearch which accepts the name of the array and the value. Any little help would be highly appreciated since this is very very urgent. Thanks all of you in advance.
Reply
Answers (
5
)
Is there a free compilator for c#?
Newbie-Help on Presentation tool