1
2



1
2
//배열을 리스트로
List<int> testList = testArr.ToList();
 
...
 
//리스트를 배열로
int[] testArray = testList.ToArr();
cs

역시 똑똑한 사람들이 만들어둔 물건에는 이런 간단하지만 직접만들라면 귀찮은 기능들이 기본으로 주어져서 참 좋은거 같다 !

블로그 이미지

stuban

ㅇ.ㅇ

,
1
2
3
4
5
6
7
8
List<Test> result = new List<Test>();
 
//합치기
result.AddRange(list1);
result.AddRange(list2);
 
//중복 제거
result = result.Distinct().ToList();
cs



블로그 이미지

stuban

ㅇ.ㅇ

,