Alessandro Dindinelli2,545 Points
Static Void meaning in C#?
Hi, I may have missed the point when it was explained before, but I can't understand what "static void" means; can someone explain? Thanks
Both of those are somewhat complex topics that are intentionally not explained in too much detail at this point in the course. As they pretty much require you to understand some concepts that you have not been taught yet and are therefore not really part of the "basics" this course is intended to teach. The void part will make more sense after learning more about how methods work, and static is even more complex and requires a decent understanding of how classes and objects work.
I'll give you an answer as to what they are but it likely won't help you too much at the moment.
void is a return type, it tells C# that the Main method does not return any value. Now what does it mean when I say return a value? That is where the knowledge of methods come in, I recommend you just wait until methods are covered in more detail in the course, you will be thought more about returning values and the various return types at that point.
static as mentioned above is even more complex, the simple answer is that it allows you to access a method directly from a class without needing to create an instance of it. If that answer does not mean much to you then that is completely fine, as you have not been taught a lot about classes or instantiation yet, but these are all things that will start to make sense as you get farther into the course.
If you really want me to go into more detail on those topics then I can write a more detailed answer, but I really would recommend that you just wait a bit and let the course explain these topic at its own pace, as it will likely be easier for you to follow along that way.