Bop It Freak
Bop It Freak

Reputation: 37

Predefined type 'System.Collections.Generic.IReadOnlyCollection`1' is not defined or imported

I'm trying to use a readonly collection in my c# project, but it says it can't find it in System.Collections.Generic. I'm using .Net Framework 4 Client Profile. Am I using the wrong version?

I'm trying to use it in a LinkedList<int>

_history.Sum()

Upvotes: 0

Views: 1156

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062492

This type was added in .NET Framework 4.5; so it won't exist in 4.0 (client-profile or otherwise). See "applies to" in the docs.

Upvotes: 3

Related Questions