Kind of stuck here.
I'm porting over a section of code from Java to C#, and I'm having an issue with method permissions constructors.
Early in my code, i have this class..
public class TCard
{
int suit;
int rank;
}
and later i've got this method, which throws a bunch of errors.
Identifiers highlighted with the double asterixes throw the "is innaccessible due to its protection level" error.
I've tried rebuilding my solution, and this hasn't worked.
public void loadDeck(TCard[] deck)
{
int count;
for (count = 1; count <= 52; count++)
{
deck[count] = new TCard();
deck[count].**suit** = 0;
deck[count].**rank** = 0;
}
String lineFromFile;
string currentFile = "";
currentFile = new AQAReadTextFile2014();
currentFile.openTextFile("deck.txt");
count = 1;
lineFromFile = currentFile.readLine();
while (lineFromFile != null)
{
deck[count].**suit** = Integer.parseInt(lineFromFile);
lineFromFile = currentFile.readLine();
deck[count].**rank** = Integer.parseInt(lineFromFile);
lineFromFile = currentFile.readLine();
count = count + 1;
}
currentFile.closeFile();
}
There's probably some kind of blatant error here.
This is my first time porting from C# to Java, so forgive me if I've gotten myself confused between the two.