The first error is because of a missing namespace (“using System.Linq;” I think). I recommend using an IDE that can autofill namespace automatically. I’m using Visual Studio (which also has a free version available) but I think you may be able to achieve similar results vs Visual Studio Code.
The second error is probably also related to a missing namespace (or a package in your project?).