❔ Only onecompilation unit can have top-level statements.

Are you familiar with this error?
5 Replies
Jimmacle
Jimmacle2y ago
yes, you have more than one file in your project using top level statements all your other files need their code defined in classes
() => { return null; }
yes i got it now i saw that i accidentally copy pasted 2 program.cs thanks mate
camel
camel2y ago
What does your api message request builder do? Looks interesting to me
() => { return null; }
it will just return an api response, it is responsible for processing the api request, then returns back the api response
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server