It’s hard to explain these things while staying ELI5 because what you should be looking for is an introduction to C#.
Classes are like folders where the code is organized in “methods” and “attributes”.
A namespace is like a prefix to the class name. It is used to prevent conflicts. In a huge application with a lot of libraries you will likely end up with two classes of the same name. You use their namespace to differentiate them like so: NamespaceA.MyClass and NamespaceB.MyClass.
If you are only using one version of MyClass and you do not want to type NamespaceA.MyClass everytime, you can add “using NamespaceA” and it will know which namespace to use when referencing MyClass.
“static void Main(string[] args)” is the entry point of your program. When you launch the application this is what your operating system will call first.
Latest Answers