C# APP
Basically i am trying to use indexing on an array that i have fed into a method as its parameter. Here is a simplified version of my code.
I get an error saying that it "Cannot apply indexing with [] to an expression of type System.Array" I cant see why there should be any problem with my code. Any help or advice would be great.
Thanks
Basically i am trying to use indexing on an array that i have fed into a method as its parameter. Here is a simplified version of my code.
Code:
public void Inputs(string path)
{
string line;
line = inputstream.ReadToEnd();
string[] words;
char[] seperators = { '\t', '\n' };
words = line.Split(seperators);
listSeperation(words, line);
}
public void listSeperation(Array words, string line)
{
string[] UID = new string[studentlength];
int j=0;
for (int i = 1; i < words.Length; i = i + 5)
{
UID[j++] = words[i]; //error
}
}
Thanks
Comment