c# Skip
![[C#] LINQ 개념 (Language INtegrated Query)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FbPauHK%2FbtqDXE5D1OQ%2FAAAAAAAAAAAAAAAAAAAAAC-jsxuY0YP1PigP2CFU9piwcFyvUvF8VGRqOHh5oABd%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3D4CXvR4A5SIB0Dp46EcfZmzEoeh8%253D)
[C#] LINQ 개념 (Language INtegrated Query)
1. 사전 복습 using System; using System.Collections.Generic; class Program { static void Main() { int[] arr = {1, 2, 3, 4, 5}; foreach(int n in arr) Console.WriteLine(n) IEnumerable col = arr; foreach(int n in col) Console.WriteLine(n); } } 배열을 하나 만들고 foreach를 이용해 요소를 출력해보는 코드이다. 그런데 foreach의 원리는 결국 배열이 갖고있는 GetEnumerator() 메소드를 호출해 열거자를 꺼내는 방식이였다. 모든 컬렉션은 IEnumerable 인터페이스를 구현해야 하고 배열도 컬렉션이므로 GetEn..