남이 지은 클래스명같은걸보면 뭐야 저거 할까봐 한글로 써봤는데 더 이상한가보네 ㅠㅠ
코드로 한번 써볼께
///////////////////////////////////////////////////////////////////////////////////////////////////////////
    public class Tile
    {
        public Button b;
        public int t;
    }//버튼b와 버튼이 가져야할 속성t를 묶었어. 사실 버튼의 텍스트를 줘도 되는데 뽑기 편해서 ㅡㅡ;

    public class GameObject
    {
        public int height;
        public int width;
        public string pic;
        public int type;
        public int z;
        public const int OBJ_BIT = 1;
        public const int OBJ_R2L = 2;
        public const int OBJ_HERO = 3;
}//텍스쳐명pic와 가로세로. 클래스의 종류를 저장하는 type. 그리고 type의 상수들.
///////////////////////////////////////////////////////////////////////////////////////////////////////////


음.main함수부분
///////////////////////////////////////////////////////////////////////////////////////////////////////////
        public Tile[,] map;//위의 tile클래스를 배열로 맴버변수에 선언했어.
        public List<GameObject> objManager;//위의 object를 관리하는list 맴버변수
        public Window1()
        {
            InitializeComponent();
            objManager = new List<GameObject>();//리스트를 메모리에 올렸어

                xmlparser xml = new xmlparser(ref objManager, ref map);//xml파일을 읽어서 처리하는 클래스. ref objManager, ref map 두개를 인자로
                xml.Load(ofd.FileName);//파일명 넣고 파싱을해.
                MakeTable(xml.getWid() / 40, xml.getHei() / 40);//파싱이 끝나면 이정보를 바탕으로 버튼을 만들어.

         }
///////////////////////////////////////////////////////////////////////////////////////////////////////////

class xmlparser
///////////////////////////////////////////////////////////////////////////////////////////////////////////
        public Tile[,] map;
        public List<GameObject> li;
        int wid;
        int hei;
        public xmlparser(ref List<GameObject> manege,ref Tile[,] mp)
        {
            li = manege;
            map = mp;
        }//생성자에서 인자로 받은 ref objManager, ref map 를 li와 mp로... 이부분이 문제가 된거같다 헐헐
        public void Load(string p)
        {
                        char[] msg;
                   map = new Tile[(int)wid / 40, (int)hei / 40];//배열을 할당.
                        foreach (XmlElement iNode in xNode.ChildNodes)
                        {
                             msg= new char[xNode.InnerText.Length];
                             msg = xNode.InnerText.ToCharArray(0, xNode.InnerText.Length);
                             int cnt = 0;
                             for (int x = 0; x < (int)wid / 40; x++)
                             {
                                 for (int y = 0; y < (int)hei / 40; y++)
                                 {
                                     map[x, y] = new Tile();
                                     map[x, y].t = Int32.Parse(msg[cnt++].ToString());값을 ref map에 저장
                                 }
                             }
                        }
                        foreach (XmlElement iNode in xNode.ChildNodes)
                        {
                            tmp = new GameObject();
                            tmp.height = Int32.Parse(iNode.GetAttribute("height"));
                            tmp.pic = iNode.GetAttribute("pic");
                            tmp.type = GameObject.OBJ_FAR;
                            li.Add(tmp);값을 ref objManager에 저장(리스트에 삽입)
                        }

///////////////////////////////////////////////////////////////////////////////////////////////////////////







하나하나 쓰다보니까
public xmlparser(ref List<GameObject> manege,ref Tile[,] mp) 가 문제인거같아;;
manege는 넘겨받은 manege의 레퍼런스를 유지하는데
mp는 넘겨받은mp의 레퍼런스가 아니라 별도의 위치에 새로 메모리를 할당하는거 같네.

맞음???;그러면 인자값에다대고 할당하려면 어떻게 해야할까;;