Could somebody convert this method to C# please (Currently java):

C#
     public static void load(Map mapData) throws IOException {
        // a much simpler way than TeleNubby's
        logger.info("Reading mapdata...");
        DataInputStream in = new DataInputStream(new FileInputStream("data/mapdata/packed.dat"));
        int useableMapdata = 0;
        while(in.available() >= 20) {
            int area = in.readInt();
            int[] parts = new int[4];
            for(int j = 0; j