Steadhaven
Steadhaven
Explore posts from servers
Mmfad
Created by Steadhaven on 8/31/2024 in #questions-and-advice
shoes for blue shorts/white t shirt
No description
3 replies
CC#
Created by Steadhaven on 5/13/2024 in #help
Translating basic UML diagram into code?
No description
4 replies
CC#
Created by Steadhaven on 3/4/2024 in #help
No Main and class confusion in newer C# versions
I am confused about the newer C# versions... When I make a console app, it just starts like so:
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
As you see, theres no class or Main method. In Java, and old C# if I am correct, we always have to have a class with a main method for our code to run. However, it seems that newer C# versions doesn't require this. Yet my confusion is: - OOP is rather valuable in a lot of scenarios, so what do we do without classes? - Is the Main method just in the first file we create? or where is it? it seems to run without it
52 replies