Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 |
Tags
- 마이크로소프트
- 윈도우폰
- 실버라이트
- usercontrol
- Windows Phone7
- DataGrid
- 한윤진
- 7
- dynamic
- silverlight4
- 임채정
- Windows
- Windows Phone 7
- 세미나
- xap
- xna
- 윈폰
- app
- silverlight
- HugeFlow
- SLKorea
- codeplex
- powerpoint
- Binding
- Microsoft
- Blend
- 실버라이트 코리아
- 실버라이트코리아
- 윈폰7
- phone
- Today
- 1
- Total
- 83,566
은광
Func 사용하기 본문
Hoons에서 먼가를 찾다가 발견한 강좌인데 까먹기 전에 포스팅(이라 적고 메모라읽는다)을 하나~
우선 자세한 내용은 이 강좌를 확인 하시고 여기서는 사용 하는 방법만 메모를 -_-b
좋은 강좌를 써주신 김수영님 캄솨 합니닷~
우선 자세한 내용은 이 강좌를 확인 하시고 여기서는 사용 하는 방법만 메모를 -_-b
좋은 강좌를 써주신 김수영님 캄솨 합니닷~
public MainPage()
{
InitializeComponent();
int[] source = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
List<int> oddNumbers = FilterOfInts(source, i => ((i & 1) == 1));
List<int> evenNumbers = FilterOfInts(source, i => ((i & 1) == 0));
listbox1.ItemsSource = oddNumbers;
listbox2.ItemsSource = evenNumbers;
}
private static List<int> FilterOfInts(int[] source, Func<int, bool> filter)
{
List<int> result = new List<int>();
foreach (int i in source)
{
if (filter(i) == true)
{
result.Add(i);
}
}
return result;
}
0 Comments