my program won't run in vs 2022, but it runs in an online compiler - C#