|
-
July 14th, 2005, 08:58 AM
#1
OOP in VB .NET
.... I just found out you can't overload Operators in VB .NET.. Now I wish I would have gone C# instead...
Stuck doing a stupid Compare function instead of a nice clean
a = b
bah...
and I can't do
a = b = c
a.compare(b).Compare(c) won't work.. cause Compare doesn't return a reference to a like a clean operator would do.
Nicolas Bohemier
-
July 14th, 2005, 08:59 AM
#2
Re: OOP in VB .NET
I believe, but could be wrong, that that'll be included in 2005.
-
July 14th, 2005, 10:06 AM
#3
Re: OOP in VB .NET
I'm comming over from C++, and it is annoying to not have things like operator overload, the post/pre increment, and even true pointers. However, remember those things are more of a convenience. You can always program other ways then with pointers, and when you overload operators, you still have all the underlying code to make it work. Which would be pretty much equal to you having to program around it.
-
July 14th, 2005, 11:27 AM
#4
Re: OOP in VB .NET
 Originally Posted by DSJ
I believe, but could be wrong, that that'll be included in 2005.
DSJ was right. In Visual Studio 2005, indeed there is proper operator overloading.
I recommend on the book in
http://msdn.microsoft.com/vbasic/whidbey/introto2005/
which you can download for free. In the second chapter it is all explained.
You will have proper operator overloading for arithmetical operators, and logical operators. Plus you will have operator overloading for CType. And the cool new operators of IsTrue, IsFalse and Not.
-
July 14th, 2005, 12:32 PM
#5
Re: OOP in VB .NET
I don't need Pointer.. but Overloading operator is OOP in my opinion and saying VB .NET is OOP but in fact hasn't Operator overload is a lie. I have to work with methods that are not necessarily as Code explicit and clean than the Operators.
IF A = B then is a whole more explicit than A.equal(b) <------ REMINDS ME OF cough cough bad cough cough Java
But anyway.. I'll work around it
Thx guys
Just wanted to point that out
Nicolas Bohemier
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|