spatio
New member
- Joined
- May 9, 2014
- Messages
- 2
- Programming Experience
- Beginner
I have read that a static method is one which can be called from from anywhere in the solution without instantiating the class containing the method. So here's my question -
W/ A Console Application - Why does the program entry point of execution, i.e. static main (), have to be static. That method generally lies within the 'Program Class' which, in a common sense way is never instantiated in an object sense. So why the necessity for static in 'static main()'.???
Also, It is possible to have the 'static main()' inside of a class which is not static, so doesn't that go against convention? i.e. static methods have to go inside static classes????
thanks Gents,
Frank
W/ A Console Application - Why does the program entry point of execution, i.e. static main (), have to be static. That method generally lies within the 'Program Class' which, in a common sense way is never instantiated in an object sense. So why the necessity for static in 'static main()'.???
Also, It is possible to have the 'static main()' inside of a class which is not static, so doesn't that go against convention? i.e. static methods have to go inside static classes????
thanks Gents,
Frank