I have an enum State
and a class Neighborhood
that uses them as data. I'm new to C#, so I'm not sure if this is idiomatic or could be more concise (or just plain wrong).
public enum State : byte
{
zero = 0,
one = 1,
two = 2
}
public class Neighborhood
{
private State _left, _center, _right;
public Neighborhood(State left, State center, State right)
{
_left = left;
_center = center;
_right = right;
}
public State left { get { return _left; } }
public State center { get { return _center; } }
public State right { get { return _right; } }
}
Is there a shorter or more idiomatic way to do this?