C
C#12mo ago
Kairos

❔ Need some help.

Hello, I'm current following a tutorial series going over the basics of C# and need some help with fixing an error I keep getting. The error I keep getting says this: Program has more than one entry point defined. Compile with /main to specify the type thacpp(CS0017). I've attached a screenshot of my code. I'd appreciate some help.
14 Replies
Mayor McCheese
Mayor McCheese12mo ago
Show all files in your project
Kairos
Kairos12mo ago
Kairos
Kairos12mo ago
Mayor McCheese
Mayor McCheese12mo ago
What is in shortstory.cs
Kairos
Kairos12mo ago
Mayor McCheese
Mayor McCheese12mo ago
There's your problem You can't have two mains like that
Kairos
Kairos12mo ago
ah ok
Mayor McCheese
Mayor McCheese12mo ago
Every file doesn't need a Main function Just your "entry point" It's the thing your compiler knows to run when you start your application ( oversimplification )
Kairos
Kairos12mo ago
i see so how do I fix it?
Mayor McCheese
Mayor McCheese12mo ago
Fit now change Main in shortdory to Main2
Kairos
Kairos12mo ago
ok
Mayor McCheese
Mayor McCheese12mo ago
That should get you over the hump
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Accord
Accord12mo 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
More Posts
❔ Free tier web hosting for .NET applications, Is it actually a thing nowadays?Hey, I'm developing a simple app just for my college and I really wanted to use all the free resourc❔ Create new instance of type unknown at runtime?Say I have a base class, ``abstract class Letter`` with child classes ``A``, ``B``, and ``C``. If I❔ .NET Framework 3.5 with Mono?I'm not sure if this is the right place, but I'll start here... I am needing to build an older projIs Regex overkill for ~2000 strings and a few conditions?Goal: My input is a list of usernames returned from an API that only contain alphanumerics and under❔ Which database for integration test using db transactionsHi there, I am coding my integration test project. And I want to test the transactionnal aspect of ✅ EF.Functions.Like() produces an exceptionI'm working with `EF Core` with `PostgreSQL`, I have the following `Asp.Net Core's Action`: ```cs pu❔ Using System ColorsHi, I'd like to access the colors that windows uses for it's apps in order to allow theming for my a✅ SignalR not working with blazor server appi have this issue with SignalR please someone help https://github.com/dotnet/aspnetcore/issues/49656✅ SQL Command Timeout does not work with async callsHas anyone encountered the following issue? When using a sync call to the database, the command time❔ anyone knows have to export my keyboard shortcuts from vs code to visual studio 2022?i want to extend the functionality that i have in vs code to vs 2022 but idk how to create keyboard