You've created a WPF project. The sample you're referencing starts with a C# console application.

Do you know how to create a C# console project?