Q:

How to convert Java code snippet into C#

I'm struggling to understand how to convert this Java code into a C# one.  Any help is greatly appreciated.
public enum Direction {

NORTH(0), EAST(1), SOUTH(2), WEST(3);
private static Map<Integer, Direction> map = new HashMap<Integer, Direction>();

static {
    for (Direction directionEnum : Direction.values()) {
        map.put(directionEnum.directionIndex, directionEnum);
    }
}

A:

Here is your ported C# code. Knowledge of Enum.GetValues(typeof(Direction) API is the only thing which could have hindered your smooth porting if you don't know it. Hope this helps!
        public enum Direction
        {
            NORTH = 0,
            EAST = 1,
            SOUTH = 2,
            WEST = 3
        }

        private static Dictionary<int, Direction> map = new Dictionary<int, Direction>();

        private static void PortJavaCodeToCSharp()
        {
            foreach (var directionName in Enum.GetValues(typeof(Direction)))
            {
                map.Add((int)directionName, (Direction)directionName);
            }    
        }

