@property with 2 arguments
Jonathan M Davis
newsgroup.d at jmdavisprog.com
Sun Oct 1 06:34:56 UTC 2017
On Sunday, October 01, 2017 05:57:53 Tony via Digitalmars-d-learn wrote:
> "@property functions can only have zero, one or two parameters"
>
> I am looking for an example of an @property function defined with
> two parameters and the syntax for how it is accessed without ().
If it has two parameters, then it's a free function that can be used as a
setter. e.g.
@property void foo(ref T t, int i)
{
...
}
myT.foo = 42;
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list