Tony
Tony
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
i don't understand how it works but thanks man
15 replies
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
oh u made the function and the list static
15 replies
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
what you modified?
15 replies
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
15 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
oh ok yeah i was using foreach (Player in Players) { ... }
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
how do i iterate over Players
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
class Player
{
public string _playerName;
public int playerID;
public Player(string playerName,int playerIdentifier)
{
_playerName = playerName;
playerID = playerIdentifier;
List<Player> Players;
}
}
class Player
{
public string _playerName;
public int playerID;
public Player(string playerName,int playerIdentifier)
{
_playerName = playerName;
playerID = playerIdentifier;
List<Player> Players;
}
}
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
no
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
thanks i will keep that in mind
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
uh but if i want to iterate over them with a foreach() how do i use that like with a foreach(string player in Players) or how
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
thanks man
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
Damn c# is nice
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
so when i do List<Player> Players; and i iterate trough all of them i will get all the instances?
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
and how to use it
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
Uh i don't think i know what that is
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
i want both of them stored somewhere and when i check all the instances of Player Class i can see all of them grouped name with id
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
is not for a game is just for me learning c# and yes his name and his id
33 replies
CC#
Created by Tony on 2/10/2023 in #help
✅ Tuples in classes
how can i put that tuple into a list so whenever i need a player name and his id i can get it from that list
33 replies