Find Item in BST

I have written a program which creates the BST that is attached.  All nodes have a left and right child pointer that points to the next node.  I am trying to write a method that will read in a string from a file and then search the BST for that string.  If it finds it it will write to the log file.  I have written the following code but it doesn't seem to search through the array.  Any ideas or ways to fix it?
microsoft        3989898989 02 03 
java             1357357357 05 12 
zipinfo          0490080000 04 28 
pizzahut         3789789789 20 07 
google           3333333333 06 08 
cnn              1444444444 21 09 
yahoo            2121212121 11 00 
ilounge          4040404040 18 00 
dictionary       0555555555 31 10 
expedia          1234543210 00 17 
un               3939393939 13 14 
limewire         1010101010 22 00 
quicken          4294967295 00 15 
verizon          2468246824 00 16 
secondlive       1888888888 25 26 
wikipedia        4242424242 00 19 
facebook         1616161616 00 29 
howstuffworks    0000000001 00 00 
xe               0123123123 00 00 
nytimes          1234554321 27 23 
barnesandnoble   1111111111 24 00 
kalamazoocity    2444666888 00 00 
oprah            2999999999 00 00 
amazon           2222222222 00 30 
radioshack       4294000000 00 00 
tripadvisor      0777777777 00 00 
public static void Query(ref StreamReader ReadUser,ref string TransUser, ref string[,] BSTHold)
            string urlRead = "";
            for(int i = 2; i < 18; i++)
                urlRead += TransUser[i].ToString(); //if i read in    microsoft, i want it to search the array for it
            int index = Array.BinarySearch(BSTHold, 0, BSTHold.Length, urlRead);
            if (index > 0)
                MessageBox.Show("Found {0}", urlRead);
            else if (index == BSTHold.Length)
                MessageBox.Show("{0} was not found", urlRead);

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Can you please explain what you are trying to do here?

            for(int i = 2; i < 18; i++)
                urlRead += TransUser[i].ToString(); //if i read in    microsoft, i want it to search the array for it
If you are looking for "Microsoft", what is the purpose of concatenating some characters from "TransUser" into another string?


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Two more points:
1. Array.BinarySearch works on an ordered array only.
2. You say you have the information stored in a BST - not sure what you mean by that. Sounds like Binary (something) Tree. The data shows a name, some number, and links to the left child and right child. However, you are passing a multi-dimensional string array into your method.

We need more details about how you are storing the data before we can think about searching the contents.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.