Re: What does this notation mean?
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Mon, 20 Feb 2006 09:18:06 -0600
"Ricardo" <ricardo@xxxxxxxxxxxxxxxxxxx> wrote in message
news:11vjl85ig419568@xxxxxxxxxxxxxxxxxxxxx
Hi, I thought I'd create a class in my VB6 and a collection to go alongwith
it. On looking through the collection I came across ".[_NewEnum]" in the
property below and wondered what it meant. Actually I'm a bit confused by
the whole definition of the property.
Any clarification on this would be much appreciated.
Thanks
Public Property Get NewEnum() As IUnknown
'this property allows you to enumerate
'this collection with the For...Each syntax
Set NewEnum = mCol.[_NewEnum]
End Property
"_NewEnum" is the actual COM name for the enumerator, but an underscore "_"
is an illegal first character in a name in VB so it has to be 'escaped' with
the "[...]" characters.
Using square brackets to escape names also shows up in VB when one uses
spaces in Field/Column names or when one encounters such names as also being
keywords or functions, ie [Yesterday Date] or [Date].
It is also used in Function/Sub Declarations when an API function name
starts with an underscore.
-ralph
.
- References:
- What does this notation mean?
- From: Ricardo
- What does this notation mean?
- Prev by Date: Running very old Fortran code in VB
- Next by Date: Re: Wish I was using .net
- Previous by thread: Re: What does this notation mean?
- Next by thread: Running very old Fortran code in VB
- Index(es):
Relevant Pages
|