Re: is it possible to use out and ref keyword together???
- From: "Marc Gravell" <marc.gravell@xxxxxxxxx>
- Date: Fri, 24 Nov 2006 09:46:54 -0000
In 99.9% of cases. There are (rare) occasions when you genuinely intend to
reassign a reference that was passed in, and you can't (for some reason)
return the new reference in the return value.
But yes; in many cases "ref" on a reference type parameter is due to
misconceptions. In contrast, "out" is IMO becoming more mainstream and more
useful that "ref", largely due to adopting the TryGetValue and TryParse
signatures from the 2.0 classes.
Marc
.
- Follow-Ups:
- Re: is it possible to use out and ref keyword together???
- From: Jeff Louie
- Re: is it possible to use out and ref keyword together???
- From: Truong Hong Thi
- Re: is it possible to use out and ref keyword together???
- References:
- is it possible to use out and ref keyword together???
- From: selva
- Re: is it possible to use out and ref keyword together???
- From: Kevien Lee
- is it possible to use out and ref keyword together???
- Prev by Date: Re: 1>>x behaviour
- Next by Date: Re: Is my code correct and propper?
- Previous by thread: Re: is it possible to use out and ref keyword together???
- Next by thread: Re: is it possible to use out and ref keyword together???
- Index(es):
Relevant Pages
|
|