Re: 'Resetting' a collection with new members .. Is this correct?




"Ronald Raygun" <invalid@xxxxxxxxxx> wrote

Private Property Let ResetCollection(info() As clsInfo)

Others already addressed the behaviour (For Each would be my
suggestion as well) but I thought I would focus your attention to
the syntax you are creating.

Resetting your collection is a task, a job you want accomplished
when called. It would not do well as a property. A property is
a value, a state the computer is currently in. The syntax you create
by making it a property is of the form:

MyInfo.ResetCollection = NewInfo

Making it a property could lead some to (possibly) assume there are
multiple collections in effect here. The initial collection the class supports
and this ResetCollection which is assigned as shown above.

If it were up to me, I'd say ResetCollection needs to be a Sub.

LFS


.



Relevant Pages

  • Re: Help with Docmd Open form
    ... Thanks Roy I got the suggested syntax from the Microsoft site! ... subform which is what I think you have in Me!Clientsubform.Form!cmbproject ... the cursor is within the OpenForm keyword in VBE, ... suggestion, where I assume the subform is a subform residing on the ...
    (microsoft.public.access.formscoding)
  • Re: detecting unwanted characters
    ... I tried the other suggestion first. ... Is this syntax described somewhere? ... UNacceptable characters, preferably without having to enumerate them. ... In a select query with both tables not joined add a calculated field like ...
    (microsoft.public.access.queries)
  • What could f(this:that=other): mean?
    ... Giudo has suggested adding optional static typing to Python. ... I'm going to suggest a different use for a similar syntax. ... XSLT is of course a big user of namespaces in XML. ... this suggestion is mostly syntactic sugar for ...
    (comp.lang.python)
  • Re: DataColumn Expression
    ... Sorry for letting you wait for so long time. ... syntax for DataColumn.Expression property: ... Please apply my suggestion above and let me know if it helps resolve your ... Microsoft Online Partner Support ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: UPDATE server_table INNER JOIN local_table
    ... Thanks for your suggestion. ... Here is the original SQL ... I modified it to conform to the syntax you suggested, ... > Server, as well as most other enterprise level databases, support the ANSI ...
    (microsoft.public.sqlserver.clients)