I want to create a list of type class which has properties which I can add to.
Also to be able to access these properties?
Here’s what I have so far.
public class Class1
{
enum Player
{
Me,
Opponent
}
public class MovesMade
{
Player Peep = new Player { };
//Other properties here
}
List<MovesMade> AllMoves = new List<MovesMade> {};
public void MyFunc()
{
AlllMoves.Add ??
if (AllMoves.Peep == Player.Me) {
}
}
}
To make a property of a class accessible outside of itself, mark it public.
Here is your example modified a bit to get you started.