By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,441 Members | 998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,441 IT Pros & Developers. It's quick & easy.

OOP and properties in VB

P: n/a

--
hello

When using properties with OOP, VB6 had Get/Let and VB.net has Readonly/and
....

Are theses OOP concepts with Property use or only specific to Visual Basic
properties,

With this property use does C++ have this as well or just Visual C++.?
Nov 21 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
John,

In dotNet all programs made in managed code can use mixed the classes made
and which are in a DLL (libary) as if they where made by the same languages.

The way properties are created and used in the languages itself is specific
to those languages.

Is that your question?

Cor

"john andrew" <jo********@discussions.microsoft.com>

--
hello

When using properties with OOP, VB6 had Get/Let and VB.net has
Readonly/and
...

Are theses OOP concepts with Property use or only specific to Visual Basic
properties,

With this property use does C++ have this as well or just Visual C++.?

Nov 21 '05 #2

P: n/a


So some features of OOP in VB.net (and vb6) are not standard OOP features
but Micosoft add-ons...so all OOP languages must have an amount of add-ons
not found in OOP general concepts.

"Cor Ligthert" wrote:
John,

In dotNet all programs made in managed code can use mixed the classes made
and which are in a DLL (libary) as if they where made by the same languages.

The way properties are created and used in the languages itself is specific
to those languages.

Is that your question?

Cor

"john andrew" <jo********@discussions.microsoft.com>

--
hello

When using properties with OOP, VB6 had Get/Let and VB.net has
Readonly/and
...

Are theses OOP concepts with Property use or only specific to Visual Basic
properties,

With this property use does C++ have this as well or just Visual C++.?


Nov 21 '05 #3

P: n/a
> So some features of OOP in VB.net (and vb6) are not standard OOP features
but Micosoft add-ons...so all OOP languages must have an amount of add-ons
not found in OOP general concepts.

What you write for VB6 is true, not for VBNet. I had not the idea I have
written that in any way, you make me curious, what sentence of my did let
you make that conclussion. All Net languages follow the general concept of
OOP. VB6 does not.

VBNet and VB6 have beside the most classic VB keywords not so much in
common, therefore I don't understand why you connect them.

Cor
Nov 21 '05 #4

P: n/a
You can do basic OOP in VB6....which are good enough for IMO decent OOP.
VB.net isnt that different to VB6 in a lot of ways if you already know some
OOP and Java,C
The architecture of .Net is behind the scenes is different.

Anyway I was actually refering to the fact that C++ doesnt have properties
which you set Readonly like VB.net (I couldnt find it in Borland C++) and
wondered if these were VB ideas?

I kind of see C++ as the OOP (defacto) standard .

"Cor Ligthert" wrote:
So some features of OOP in VB.net (and vb6) are not standard OOP features
but Micosoft add-ons...so all OOP languages must have an amount of add-ons
not found in OOP general concepts.

What you write for VB6 is true, not for VBNet. I had not the idea I have
written that in any way, you make me curious, what sentence of my did let
you make that conclussion. All Net languages follow the general concept of
OOP. VB6 does not.

VBNet and VB6 have beside the most classic VB keywords not so much in
common, therefore I don't understand why you connect them.

Cor

Nov 21 '05 #5

P: n/a
John,

You can see everything as your own (defacto) standard, feel free to that.

However that does not say it is.

Cor

"john andrew" <jo********@discussions.microsoft.com>
You can do basic OOP in VB6....which are good enough for IMO decent OOP.
VB.net isnt that different to VB6 in a lot of ways if you already know
some
OOP and Java,C
The architecture of .Net is behind the scenes is different.

Anyway I was actually refering to the fact that C++ doesnt have properties
which you set Readonly like VB.net (I couldnt find it in Borland C++) and
wondered if these were VB ideas?

I kind of see C++ as the OOP (defacto) standard .

"Cor Ligthert" wrote:
> So some features of OOP in VB.net (and vb6) are not standard OOP
> features
> but Micosoft add-ons...so all OOP languages must have an amount of
> add-ons
> not found in OOP general concepts.
>

What you write for VB6 is true, not for VBNet. I had not the idea I have
written that in any way, you make me curious, what sentence of my did let
you make that conclussion. All Net languages follow the general concept
of
OOP. VB6 does not.

VBNet and VB6 have beside the most classic VB keywords not so much in
common, therefore I don't understand why you connect them.

Cor

Nov 21 '05 #6

P: n/a
"=?Utf-8?B?am9obiBhbmRyZXc=?=" <jo********@discussions.microsoft.com>
wrote in news:D7**********************************@microsof t.com:
Anyway I was actually refering to the fact that C++ doesnt have
properties which you set Readonly like VB.net (I couldnt find it in
Borland C++) and wondered if these were VB ideas?


I believe Properties in C++ is a custom add-on of Borland. If you want
readonly properties you'll have to implement that feature I think. (but I
don't use C++ very much so I can't be sure).

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 21 '05 #7

P: n/a

"john andrew" <jo********@discussions.microsoft.com> wrote

I kind of see C++ as the OOP (defacto) standard .


When I think of early OOP languages, I think of SmallTalk.
I've never used it, but did do some reading about it....

LFS
Nov 21 '05 #8

P: n/a
"john andrew" <jo********@discussions.microsoft.com> schrieb:
When using properties with OOP, VB6 had Get/Let and VB.net has
Readonly/and
...

Are theses OOP concepts with Property use or only specific to Visual Basic
properties,

With this property use does C++ have this as well or just Visual C++.?


Notice that properties are sort of (very valuable and useful) syntactic
sugar. In Java people are using 'get' and 'set' methods instead of
properties, and one could archieve a read-only property by simply not
implementing a "setter". That's similar in other programming languages that
don't provide high-level syntactical support for implementing attributes.

Managed C++ provides support for properties with the '__property' keyword.
It's possible to write read-only properties too by only writing a
'__property Bla get_MyBla'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #9

P: n/a
"john andrew" <jo********@discussions.microsoft.com> schrieb:
Anyway I was actually refering to the fact that C++ doesnt have properties
which you set Readonly like VB.net (I couldnt find it in Borland C++) and
wondered if these were VB ideas?

I kind of see C++ as the OOP (defacto) standard .


Huh?!

In theory, there is a set of OO features, and many OO languages provide only
a small subset of these features (VB.NET, C#, Java, ... provide PIE
(Polymorphism, Inheritance, Encapsulation) support, VB6 didn't do that out
of the box (we are speaking VB6 being an object-based programming language
instead of being an object-oriented programming language, although there was
rudimentary support for OO). So, C++ is not /the only/ OO language that
demonstrates /all possible/ OO features.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #10

P: n/a
John,
Huh? (to the entire thread).

As Herfried states: Properties are simply syntactic sugar to accessor
methods. The concept of encapsulating access (accessor methods) is a major
tenant (concept) of OO.

The .NET Framework (C#, VB.NET, Managed C++) support properties just as VB6
did. The specific syntax for declaring the property may change slightly
between the languages, however you access them the same in all the
languages, you access them as you would a field...

Other platforms, such as Java & J#, use get/set accessor methods. Which
means you need to use method invocation syntax to use them. This also means
that J# although a .NET language requires you to use the underlying get/set
method that the property creates...
Assume you have a Person class with a "Name" property in a .NET, you can
use:

aPerson.Name = "Jay"
value = aPerson.Name

While in Java a Person class with "Name" accessor methods you would use:

aPerson.setName("Jay")
value = aPerson.getName()

If you look at the IL, the .NET code actually generates calls that look like
the Java! Syntactic sugar!

The following section of MSDN identifies Language Equivalents

http://msdn.microsoft.com/library/de...quivalents.asp

I don't see that it discusses Properties specifically.

Hope this helps
Jay

"john andrew" <jo********@discussions.microsoft.com> wrote in message
news:73**********************************@microsof t.com...

--
hello

When using properties with OOP, VB6 had Get/Let and VB.net has
Readonly/and
...

Are theses OOP concepts with Property use or only specific to Visual Basic
properties,

With this property use does C++ have this as well or just Visual C++.?

Nov 21 '05 #11

P: n/a
Get and Set are accessor methods that are provided for Read/Write
properties. Removing the Get accessor will render the property a
Write-Only property and removing the Set will make it a ReadOnly
property.

with regards,
J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.