MyInteger.ToString

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I create something which is based upon an integer and that does this...

Dim _Resolution as MyInteger = 100
Debug.Assert( _Resolution.ToString = "100 dpi")
 
Can I create something which is based upon an integer and that does this...

Yes, if you're using VB 8/2005. The first line requires defining your
own implicit conversion operator from Integer, and the second simply
to override the ToString method.


Mattias
 
Hi Richard,

Thanks for Mattias's reply. I just wanted to check how things are going. If
there is any question, please feel free to join the community and we are
here to support you at your convenience. Thanks again and Merry Christmas!

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top