473,473 Members | 2,138 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Is Dot Net Really belongs to Object Oriented ?

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
May 7 '06 #1
3 1447
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

May 7 '06 #2
Reny,

You are right. But what is the disadvantage in your opinion?

In my opinion does oriented not say that it can only be.

Cor

"Reny" <re**@bxtech.com> schreef in bericht
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

May 7 '06 #3
V
Hi Reny,

Object Oriented theories are guidelines which allow for a design and
development style which basically teaches you how to abstract the
problem and thereby reduce complexity. Hardly any modern language can
be said to be purely object oriented.

Also, Grady Booch says that an Object Model should necessarily have the
following elements: Abstraction, Encapsulation, Modularity, and
Hierarchy. In addition to these, it is good to have the following 3
elements also: Typing, Concurrency, and Persistence.

As far as I can think, C# allows you to make designs whose Object
Models would have all of the 7 elements mentioned above.

Regards,
Vaibhav

May 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin | last post by:
When was inheritance intruduced into object oriented programming? More generally, does anyone know or have any sources on when the different features were introduced into object oriented...
6
by: Gert Mellak | last post by:
Hi! I'm writing an online-shop that receives data-updates about the company's products as xml-files. I'm not sure about the Group-Tags - is this really xml-standard?? They should represent the...
65
by: Roger Smythe | last post by:
A means for the progressive decomposition a problem space into increasingly simpler component parts such that these component parts represent higher levels of conceptual abstraction, and are...
31
by: N.Davis | last post by:
I am very new to Python, but have done plenty of development in C++ and Java. One thing I find weird about python is the idea of a module. Why is this needed when there are already the ideas of...
14
by: Rookie | last post by:
Is C an object oriented programming language?
47
by: Thierry Chappuis | last post by:
Hi, I'm interested in techniques used to program in an object-oriented way using the C ANSI language. I'm studying the GObject library and Laurent Deniau's OOPC framework published on his web...
46
by: ajba74 | last post by:
Hi fellows, I am reading some books to learn the C programming language, and sometimes I have the feeling that when somebody becomes a C expert, he must learn a more modern and object-oriented...
3
by: notnorwegian | last post by:
i have some confusion over this. sure a class is basically a classification, like for example an animal or flower. and an object/instance of that class is then for example a cat. an object is...
17
by: Chris M. Thomasson | last post by:
I use the following technique in all of my C++ projects; here is the example code with error checking omitted for brevity: _________________________________________________________________ /*...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.