473,320 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

VB.NET and object-oriented ??

Is VB.NET is Pure Object Oriented Language? If so, then how it is possible
to write VB.NET Console Applications without classes? For Example:

Module M1
Sub Main()
System.Console.WriteLine("Hello World.")
End Sub
End Module
Here there is no class used. Then how can we say it is a Pure Object
Oriented Language.
Jul 21 '05 #1
6 1269
"Julianna" <an*******@discussions.com> schrieb:
Is VB.NET is Pure Object Oriented Language? If so, then how
it is possible to write VB.NET Console Applications without
classes? For Example:

Module M1
Sub Main()
System.Console.WriteLine("Hello World.")
End Sub
End Module

Here there is no class used. Then how can we say it is a Pure Object
Oriented Language.


Gladly VB.NET is not a pure OOP language only. VB.NET includes many
additional non-OO productivity featurers, but still supports PIE.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Jul 21 '05 #2
hi,

VB.Net is an Object oriented programming language because it supports all
the requirements like Inheritance, polymorphism etc.. Infact i should also
include the Structured exception handling also. To use or not to use any of
this function is a programmer choice. As far as your question is concerned,
it is true that here you are not creating any class. But if you look at its
IL code, you will see that VB.NET compiler has created a class in it. This
module is just to make the VB 6.0 people comfirtable with programming in
VB.NET and Microsoft has done its effort in making the VB.NET compiler
compatible with some good feature of Vb 6.0

regards
Nishith

"Julianna" wrote:
Is VB.NET is Pure Object Oriented Language? If so, then how it is possible
to write VB.NET Console Applications without classes? For Example:

Module M1
Sub Main()
System.Console.WriteLine("Hello World.")
End Sub
End Module
Here there is no class used. Then how can we say it is a Pure Object
Oriented Language.

Jul 21 '05 #3
Hi Julianna, nice to meet you!

I think you confuse the terms a bit... For example compare C and C++. Most
people agrre to the fact that C++ is a pure OO language, whilst C is not. But
yet you can define a

struct Car
{
};

in C++... but that doesn't mean it is less OO. What differes is that in C
you can't use inheritance like

virtual class Car : Vehicle
{
}

or polymorphism.

It is the same difference in VB6 and VB.NET... You can't write pure OO code
in vb6, but you can in VB.NET... But that doesn't mean that they have thrown
out all the old syntax and structures. The struct still applies in vb.net
(compare the Type keyword)... but it still provide you with all the tools you
need to write OO programs...

Am I confusing it? Please don't worry about the"pure" word here... But .net
framwork and vb.net is as close to "pure" OO you will ever come, I think.

/Henrik

"Julianna" wrote:
Is VB.NET is Pure Object Oriented Language? If so, then how it is possible
to write VB.NET Console Applications without classes? For Example:

Module M1
Sub Main()
System.Console.WriteLine("Hello World.")
End Sub
End Module
Here there is no class used. Then how can we say it is a Pure Object
Oriented Language.

Jul 21 '05 #4
Thanks to Herfried, Nishith, Henrik.
You guys were great help :-)
Thanks again !!

"Henrik Nordgren" <He************@discussions.microsoft.com> wrote in
message news:AB**********************************@microsof t.com...
Hi Julianna, nice to meet you!

I think you confuse the terms a bit... For example compare C and C++. Most
people agrre to the fact that C++ is a pure OO language, whilst C is not. But yet you can define a

struct Car
{
};

in C++... but that doesn't mean it is less OO. What differes is that in C
you can't use inheritance like

virtual class Car : Vehicle
{
}

or polymorphism.

It is the same difference in VB6 and VB.NET... You can't write pure OO code in vb6, but you can in VB.NET... But that doesn't mean that they have thrown out all the old syntax and structures. The struct still applies in vb.net
(compare the Type keyword)... but it still provide you with all the tools you need to write OO programs...

Am I confusing it? Please don't worry about the"pure" word here... But ..net framwork and vb.net is as close to "pure" OO you will ever come, I think.

/Henrik

"Julianna" wrote:
Is VB.NET is Pure Object Oriented Language? If so, then how it is possible to write VB.NET Console Applications without classes? For Example:

Module M1
Sub Main()
System.Console.WriteLine("Hello World.")
End Sub
End Module
Here there is no class used. Then how can we say it is a Pure Object
Oriented Language.

Jul 21 '05 #5
Think of a Module as a class with only static methods :-)

--
Sriram Krishnan

http://www.dotnetjunkies.com/weblog/sriram
"Julianna" <an*******@discussions.com> wrote in message
news:uX**************@TK2MSFTNGP11.phx.gbl...
Thanks to Herfried, Nishith, Henrik.
You guys were great help :-)
Thanks again !!

"Henrik Nordgren" <He************@discussions.microsoft.com> wrote in
message news:AB**********************************@microsof t.com...
Hi Julianna, nice to meet you!

I think you confuse the terms a bit... For example compare C and C++.
Most
people agrre to the fact that C++ is a pure OO language, whilst C is not.

But
yet you can define a

struct Car
{
};

in C++... but that doesn't mean it is less OO. What differes is that in C
you can't use inheritance like

virtual class Car : Vehicle
{
}

or polymorphism.

It is the same difference in VB6 and VB.NET... You can't write pure OO

code
in vb6, but you can in VB.NET... But that doesn't mean that they have

thrown
out all the old syntax and structures. The struct still applies in vb.net
(compare the Type keyword)... but it still provide you with all the tools

you
need to write OO programs...

Am I confusing it? Please don't worry about the"pure" word here... But

.net
framwork and vb.net is as close to "pure" OO you will ever come, I think.

/Henrik

"Julianna" wrote:
> Is VB.NET is Pure Object Oriented Language? If so, then how it is possible > to write VB.NET Console Applications without classes? For Example:
>
> Module M1
> Sub Main()
> System.Console.WriteLine("Hello World.")
> End Sub
> End Module
>
>
> Here there is no class used. Then how can we say it is a Pure Object
> Oriented Language.
>
>
>


Jul 21 '05 #6

"Julianna" <an*******@discussions.com> wrote
Is VB.NET is Pure Object Oriented Language? If so, then how it is possible
to write VB.NET Console Applications without classes? For Example:

Module M1
Sub Main()
System.Console.WriteLine("Hello World.")
End Sub
End Module
Here there is no class used. Then how can we say it is a Pure Object
Oriented Language.

Does the class have to be where you can see it? The compiler wraps that
up in a class behind the scenes:

..class private auto ansi sealed M1

To be a POOL wouldn't it have to support mulitple inheritance? That is
not allowed in .Net so there is at least one strike against it...

LFS
Jul 21 '05 #7

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

Similar topics

1
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object.cs in rotor. What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What I don't...
28
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()',...
9
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
16
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have...
0
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object class (Object.cs in rotor). What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What...
5
by: Matthew | last post by:
I have a nice little Sub that saves data in a class "mySettings" to an XML file. I call it like so: Dim mySettings As mySettings = New mySettings mySettings.value1 = "someText" mySettings.value2...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
3
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? ...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.