LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #17   Report Post  
Posted to microsoft.public.excel.programming
xtb xtb is offline
external usenet poster
 
Posts: 1
Default When do you need .Value?

VB.Net does support default properties.

However, it does *not * support -parameterless- default properties:

This means that you can still access collection types with the arra
syntax

*MyCollection(6)* would be the same as *MyCollecion.Item(6)*, assumin
that 'Item' was the default property.

However, Range("A1") would return the range object and not it's value
as stated earlier in the thread. This actually allows you to kee
default properties and also lose the *set* keyword.

Nice.

As an aside, it's now much easier to create default properties - yo
just specifiy it in the decaration:

Public *Default* Property Item(Index as Long)
Get
Item = MyBase.Item(Index)
End Get

Set
MyBase.Item(Index) = Value
End Set
End Property

Much nicer than having that wierd thing in the Procedure Propertie
dialogue box in VB

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"