The 2 errors have the same cause. You are trying to compare a string with an int. You can compare strings with strings or ints with ints. The last error tells you, you are trying to assign a string to an int.BTW on line 57: you cannot use assign(=) here, you must use equal(==)
You could compare with searchstring, not with SearchAreaCode.

The 2 errors have the same cause. You are trying to compare a string with an int. You can compare strings with strings or ints with ints. The last error tells you, you are trying to assign a string to an int.BTW on line 57: you cannot use assign(=) here, you must use equal(==)
You could compare with searchstring, not with SearchAreaCode.

I thought you were completely right, but after putting in those corrections, I get the same errors.

Your unsortedarray is two dimensions, but you are comparing it as though it were only one. Look at line 31 and see how you accessing areacode, then look at your if statement at line 49--see the difference?

I think you need to read up on using multi-dimensional arrays in C# so you understand what you are doing, but in both of those brackets you need numbers to access the string instead of a string[], which is what it currently resolves to.

Not to discourage you from learning how to access multi-dimensional arrays, but you should consider using a strongly typed List<> instead, if you instructor would approve.

Type List<> is the very next question. In fact, I got the rest of this assignment done just not this one. This one, I need to read in the file that has area code with state abbreviation. Sort it and then do a binary search to find what the user inputs. I did it using Array.BinarySearch but that is not what the professor wants. I will go back and reread about multi-dimensional arrays since I am so stucked here.

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...