Re: Why properties cannot be used as ref or out arguments

silky <[email protected]> Mon, 10 Mar 2008 21:33:51 +1100
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Mar 10, 2008 at 8:55 PM, Jon Skeet  wrote:
> Dean Cleaver wrote:
>  > Yeah - getting my head around it now. Sadly, it's not VB I wanted it
>  > for.
>  >
>  > Is a shame- looks like I will have to declare 2 variables, pass them in,
>  > and then analyse the returned responses to achieve what I want - takes
>  > the "ideal" 1 line call to about 7 or 8 at least - was trying to
>  > encapsulate a call, but it might not be feasible.
>
>  Sounds like an argument for tuple return types:
>
>  (FirstNameProperty, LastNameProperty) = SplitName(FullName);
>
>  :)
>
>  (Can you tell I've been learning Erlang? ;)
>
>  I've no idea how much work is required either in terms of language
>  design or CLR modifications to support this - I suspect it would be
>  feasible in "language only" but a lot more elegant with CLR integration.

Yeah I'd like this too, but I have vague feelings that it can be done
with an anonymous class. Is there such a thing? probably not. But I do
note that creating 'quick' classes is a bit easier in 3.0 ... multiple
assignments from functions would be useful though.

(a, b, c) = foo(m);

public (string, int, double)  foo (int m) { }

- --
http://lets.coozi.com.au/

There's not a problem I can't fix, because I can do it in the mix.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: http://firegpg.tuxfamily.org

iQEVAwUBR9UOgE4i+6wd5ptaAQIgDwf8CWLmxkFowVzVq5Qm96Zyx1JHH+bXfyjr
pus/FVvJpoPPRKjZfj8gk/fDJUeIhN4YcAJ3uoPCo1yQfl2qZV1Tefz0JYcmfzOo
k+v4m4CYnKL1QjYqM3vfHd9J95lx2FCNUmjqmV4qJxyAn/xvqA54PmrqBF/LImFs
92HBOPInWTJ/4e8ME9wknkc9enHtduNqLk9wOO83trulFRzpfBmPS26R9xlqrBx3
sK1TCREXyUFvRAgsE+l2QjRnFoIL46iBbu/uzIdV6eUChfYKa7K8I3G3Cpn8oYCk
lU8bBn0c5MvXmPEotT4SIJxX0SWbwfQCXFPqOCvMBclRgqinUk1vOw==
=J28+
-----END PGP SIGNATURE-----

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com