구조체 인자들을 리스트 배열로 사용…되면 좋겠다

좋겠네…

이름하고 자료형식을 두개 같이 가진 구조체…

데이터 타입에 이런게 되면 좋았을건데

문자열배열 두개 만드느라고 힘들었다

DataColumn column;

for (int i = 0; i < HeaderName.Length; i++)
            {
                column = new DataColumn();
                column.DataType = System.Type.GetType(HeaderType[i]);
                //DataNames = i;
                //column.ColumnName = Convert.ToString(DataNames);
                column.ColumnName = HeaderName[i];
                column.ReadOnly = true;
                column.Unique = false;
                // Add the Column to the DataColumnCollection.
                dt출력용.Columns.Add(column);
            }

이런식으로 썼었는데…

여기 집어넣을 string[]배열 손으로 만드느라 시간낭비 많이 한 것 같다. 구조체면 편했을건데… 하나하나 줄맞춰서 갯수세어가면서

 

Leave a Reply

Your email address will not be published. Required fields are marked *

 characters available