❔ How to run a c# file

Hey, I know this is probably the basics but I just started. I'm having trouble starting the file and checked tutorials but I'm not sure can sm help
21 Replies
Thinker
Thinker2y ago
You can't run a singular cs file
🇵🇱 MasterDroid 🇬🇧
I know you have to compile it But like idk much
Thinker
Thinker2y ago
You have to have first created a project using dotnet new
Thinker
Thinker2y ago
md MyProject
cd MyProject
dotnet new console
dotnet run
md MyProject
cd MyProject
dotnet new console
dotnet run
This is the bare minimum for a working app
🇵🇱 MasterDroid 🇬🇧
Does this look right to you?
Thinker
Thinker2y ago
That looks alright
🇵🇱 MasterDroid 🇬🇧
Nice it printed! thank you so much
Thinker
Thinker2y ago
np catsip
🇵🇱 MasterDroid 🇬🇧
Btw for c or cpp idk if you guys support that but would the process be the same or are they more complex?
Thinker
Thinker2y ago
C and C++ have nothing to do with C#
Thinker
Thinker2y ago
I don't know a lot about either but from my limited knowledge they are more complex
x0rld
x0rld2y ago
if you can don't do C
DKMK100
DKMK1002y ago
c is pain to work with and for no reason
barcode
barcode2y ago
there is a reason minimal overhead
DKMK100
DKMK1002y ago
ok but counterpoint c++ is usually fine for most purposes and has strings and stuff which make a huge difference to QOL
Henkypenky
Henkypenky2y ago
c has also strings.... the main difference is classes c++ is OOP oriented, c is not
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.

Did you find this page helpful?