My coding is correct but I cannot submit it because of one error that I don't know how to solve

Hi, so I’ve been doing exercise in C# Luciano’s lasagne and my code’s correct but I keep getting this error

You can’t arbitarily execute lines like you’re doing on the first few lines. It won’t work in our editor.

To be more specific: the C# track expects you to create a class library, not an application. And top-level statements are only allowed in the latter.