허당 레몬도리
Enumerable.Repeat<TResult> 메서드
가. 언어유형/C# 2015. 12. 11. 10:55

반복 List형태의 데이터 생성 시 사용.반복되는 단일 값이 들어 있는 시퀀스를 생성합니다.Sample : List list = new List(Enumerable.Repeat(0, 12)); IEnumerable strings = Enumerable.Repeat("I like programming.", 15); foreach (String str in strings) { outputBlock.Text += str + "\n"; } /* This code produces the following output: I like programming. I like programming. I like programming. I like programming. I like programming. I like pro..