Let's say in C# I had my Main()
function in an Entry
class that exists solely to house the entry-point. I would do it like such:
public class Entry
{
public static void Main()
{
...
}
}
I consider this pretty typical, and at least in some Java projects at work I have seen classes exist just for the main()
function and never thought twice about it. But while I have been learning more about C# and structures, I tried to do the following:
public struct Entry
{
public static void Main()
{
...
}
}
and it worked exactly the same visually. So, assuming that your entry point in C# contains only your Main()
function, does making it's container a struct
have any actual difference compared to a class
at runtime?