This is possible by introducing static members. They are not "pure OOP", but
very useful in some situations.
It's up to the programmer if he writes pure OOP code or types the whole
program as a set of static methods.
Pure OOP is not the aim of C#, VB.NET or any modern language. If you want to
do pure OOP, try smalltalk. There are many aspects of other paradigms in
future versions of VB.NET and C# (especially the functional paradigm), which
would definitely not strenghten their OOP qualities, but do strenghten their
qualities as a programming language.
So to sum up, .NET really supports OOP and static members are a part of it.
The only article on the topic I was able to find quickly, about static
members in Java:
http://www.developer.com/java/other/article.php/1025601
"Reny" <re**@bxtech.com> wrote in message
news:ug****************@TK2MSFTNGP05.phx.gbl...
Correct me if I am wrong. In an Object Oriented environment each and
everything are objects. That means we cannot directly instantiate a class
nor we can directly reference a member belongs to a class i.e.
ClassName.MethodName ()
If I am right in that sense, we are doing the just opposite in .NET.
For example in the sample Hello World Application given below
Imports System
Class HelloWorld
Public Shared Sub Main ()
Console.WriteLine (“Hello World”)
End Sub
End Class
As per MSDN Console is a Class defined inside the System Namespace. Here
we are directly calling the Method () defined inside the Class Console.
How is this possible in an OO environment?
Reny