这是存储数组的基本方法。然而,以下错误不断出现:
The first error: TelephoneNumbers.TelephoneNumbersFileReader.inputFile is a field but
is used like a type
The second error: System.IO.File.OpenText is a method but is used like a type
namespace TelephoneNumbers
{
class TelephoneNumbersFileReader
{
public void storeArray();
const int SIZE = 7;
string [] AllPhoneDetails = new string [SIZE];
int index = 0;
StreamReader inputFile;
inputFile = File.OpenText("TelephoneNumbers.txt")
}
}
任何帮助将不胜感激。谢谢你。