Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Darcy Jones   on Aug 22 In Asp.net Category.

  
Question Answered By: Calvin Banks   on Aug 22

I understand that normal function/subroutine overloading  can be done
in VB.Net, but you cannot overload operators like you can in C++.
What I really want to do is redefine the string data type  so I can
differentiate between two types of strings  in an overloaded function
(please refer to the example  in my original post).

I want to be able to create  a new variable type called FName and
then use the assignment operator  (=) to assign  a string to it.

Example:
Dim A as FName
Dim B as LName

A = "Matt"
B = "Smith"

I do not, however, want to use a property/method of a class to do
this. I tried using the default attibute on a property but it said
I needed a parameter to be a default property.

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Operator Overloading in VB.Net Or get search suggestion and latest updates.


Tagged: