Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 19th, 2005, 08:41 PM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default operator overloading in VB.NET.

Hi All,

Can anyone tell me how to achive operator overloading in VB.NET?
Suppose, I have two classes viz. Class1 and Class2, and have two instances of them say, cl1 and cl2, and I want to do operation like
---------------------
 dim a as integer
 a = cl1 % cl2
---------------------

 
Old April 20th, 2005, 05:40 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Unfortunately, you can't. This is one of the few differences between VB.NET and C#.NET. C# lets you do this. VB.NET in the 2.0 framework will support this.
 
Old April 20th, 2005, 06:00 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

Thanks Peter, Can you please tell me more differences between VB.Net and C#.Net?


 
Old April 20th, 2005, 06:05 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The only other one I can think of at the moment is the C# support for XML commenting. That's really the only one I take advantage of at the moment. But there are several more.
 
Old April 21st, 2005, 10:15 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

From my side (As I am just a beginer in VB.NET and not wizard like you.) I found this link.

http://support.microsoft.com/default...;EN-US;Q308470

I hope these may be known to you. But just I got it so I am sending for your review.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Invalid operator for data type. Operator equals di Pusstiu SQL Server 2000 2 August 10th, 2007 04:51 AM
Overloading nayeem69 .NET Framework 2.0 1 July 17th, 2007 12:30 AM
Operator Overloading In Inheritance ahmedsalam C# 0 October 18th, 2005 11:25 AM
Overloading Initialize_Class sg48 Excel VBA 1 July 11th, 2003 07:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.