I created this program and C# and it worked correctly a few weeks ago. Now, I copied all of this code to a another project I am working on. I added it to a brand new C# Cla
An educated guess: It's probably the .NET framework target version of the new project.
System.Linq was introduced on .NET Framework 3.5.
Go to Project -> Properties -> Application and check the Target Framework property. It's probably a target framework prior to 3.5