I can't find this question related to unidimentional enums and i think is different with bi-dimentional ones, so let's start.
Let's say i have this enum:
public enum TileType {Empty, Floor};
and i have this elements inside my class:
private TileType _type = TileType.Empty;
public TileType Type {
get {
return _type;
}
set {
TileType oldType = _type;
_type = value;
}
}
How can i get "Empty" or "Floor" using an index (int) to retreive them in C#?
And, like a side-question without any tipe of priority...
how would you retreive the information stored in 'oldType' TileType? (this sub questions, if you want it to answer it, answer it in the comments plz)
PS: Let's asume for purpose of this question than we already think than the enum is the way to go in this code, and than i already check the usefullness of other types of list.
Any improvement to this question or request for clarification would be much apreciated too
Thanks in advance