"If you do nothing, nothing will happen."

프로그래밍

[C#] ‘System.Collections.IEnumerable’을(를) 사용할 수 없습니다.

tedhong 2023. 2. 9. 14:16
2014-03-04 글쓴이 TED HONG

[C#] ‘System.Collections.IEnumerable’을(를) 사용할 수 없습니다.

VS에서 IEnumerable<T> 를 사용할 때

형식 인수에는 제네릭이 아닌 형식 ‘System.Collections.IEnumerable’을(를) 사용할 수 없습니다.

라는 에러가 발생할 때는

using System.Collections.Generic; 

을 추가해주면 해결 된다.

System.Collections.IEnumerable 과 System.Collections.Generic.IEnumerable 은 다른가 보다.