Aggregate?

Jun·2023년 7월 19일

C# Program Study

목록 보기
1/4

Aggregate란?

c# linq 사용 시, Min, Max, Sum, Average는 알지만, Aggregate 잘 사용하지 않음.

string[] str = { "a", "b", "c", "d", "e" };

string line = str.Aggregate((current, next) => current + "," + next);

line는?

line = a,b,c,d,e

profile
developer

1개의 댓글

comment-user-thumbnail
2023년 7월 19일

뛰어난 글이네요, 감사합니다.

답글 달기