Search
Setup for Free
C
C#
❔ "Only one compilation can have top level statements" please help
Original message was deleted
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,237
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
J
Jimmacle
•
6/11/23, 3:01 AM
you have more than one file in your project using top level statements
J
Jimmacle
•
6/11/23, 3:02 AM
only one file can do this
, all the other files must explicitly put code in classes
J
Jimmacle
•
6/11/23, 3:19 AM
why do people keep deleting their messages after someone answers
G
Gotboay
•
6/11/23, 3:21 AM
oops
A
Accord
•
6/12/23, 3:23 AM
Was this issue resolved
? If so
, run
/close
/close
otherwise I will mark this as stale and this post will be archived until there is new activity
.
Similar Threads
✅ Only one compilation unit can have top-level statements
C
C# / help
3y ago
❔ Only one compilation unit can have top-level statements. [C# start]
C
C# / help
3y ago
❔ Only one compilation unit can have top level statements err simple explanation
C
C# / help
3y ago
Only one compilation unit can have top-level statements. [Project]csharp(CS8802) [Answered]
C
C# / help
4y ago