|
| Author |
Message |
jehugaleahsa
Joined: 19 Oct 2007 Posts: 12
|
Posted: Mon Feb 25, 2008 10:42 pm Post subject: I Need a Name for a Method . . . Better than All-You-Can-Eat |
|
|
Hello:
I need a method that always returns the default value. It is similar
to DefaultIfEmpty.
public static IEnumerable MyMethodName()
{
while (true)
{
yield return default(T);
}
}
Any ideas? Anything will do. Don't ask me why this is useful . . . it
just is.
Archived from group: microsoft>public>dotnet>languages>csharp |
|
| Back to top |
|
 |
Michael C
Joined: 28 Aug 2007 Posts: 31
|
Posted: Tue Feb 26, 2008 5:57 pm Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
wrote in message @41g2000hsc.googlegroups.com...
> Hello:
>
> I need a method that always returns the default value. It is similar
> to DefaultIfEmpty.
>
> public static IEnumerable MyMethodName()
> {
> while (true)
> {
> yield return default(T);
> }
> }
>
> Any ideas? Anything will do. Don't ask me why this is useful . . . it
> just is.
How about DefaultIfEmpty? boom tish......
Michael |
|
| Back to top |
|
 |
jehugaleahsa
Joined: 19 Oct 2007 Posts: 12
|
Posted: Mon Feb 25, 2008 11:18 pm Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
On Feb 25, 6:57 pm, "Michael C" wrote:
> wrote in message
>
> @41g2000hsc.googlegroups.com...
>
> > Hello:
>
> > I need a method that always returns the default value. It is similar
> > to DefaultIfEmpty.
>
> > public static IEnumerable MyMethodName()
> > {
> > while (true)
> > {
> > yield return default(T);
> > }
> > }
>
> > Any ideas? Anything will do. Don't ask me why this is useful . . . it
> > just is.
>
> How about DefaultIfEmpty? boom tish......
>
> Michael
Yes . . . boom tish |
|
| Back to top |
|
 |
jehugaleahsa
Joined: 19 Oct 2007 Posts: 12
|
Posted: Mon Feb 25, 2008 11:35 pm Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
On Feb 25, 6:42 pm, "jehugalea...@gmail.com"
wrote:
> Hello:
>
> I need a method that always returns the default value. It is similar
> to DefaultIfEmpty.
>
> public static IEnumerable MyMethodName()
> {
> while (true)
> {
> yield return default(T);
> }
>
> }
>
> Any ideas? Anything will do. Don't ask me why this is useful . . . it
> just is.
Horn of Amalthea? Bottomless Well? Pain in the butt? |
|
| Back to top |
|
 |
jehugaleahsa
Joined: 19 Oct 2007 Posts: 12
|
Posted: Mon Feb 25, 2008 11:39 pm Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
On Feb 25, 7:35 pm, "jehugalea...@gmail.com"
wrote:
> On Feb 25, 6:42 pm, "jehugalea...@gmail.com"
> wrote:
>
>
>
>
>
> > Hello:
>
> > I need a method that always returns the default value. It is similar
> > to DefaultIfEmpty.
>
> > public static IEnumerable MyMethodName()
> > {
> > while (true)
> > {
> > yield return default(T);
> > }
>
> > }
>
> > Any ideas? Anything will do. Don't ask me why this is useful . . . it
> > just is.
>
> Horn of Amalthea? Bottomless Well? Pain in the butt?- Hide quoted text -
>
> - Show quoted text -
amaranthine, boundless, ceaseless, constant, continual, continuous,
countless, deathless, enduring, eternal, everlasting, illimitable,
immeasurable, immortal, incalculable, incessant, indeterminate,
infinite, interminable, limitless, measureless, monotonous,
multitudinous, never-ending, numberless, overlong, perpetual, self-
perpetuating, unbounded, unbroken, undivided, undying, unending,
unfathomable, uninterrupted, unlimited, unsurpassable, untold, without
end
Does my search ever come to an end . . . irony. |
|
| Back to top |
|
 |
Bill Woodruff
Joined: 19 Feb 2008 Posts: 1
|
Posted: Tue Feb 26, 2008 5:42 pm Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
Jehugathesaurus wrote : "Does my search ever come to an end . . . irony."
That is up to you, but my patience with off-topic posts definitely is finite
: plonk.
bw |
|
| Back to top |
|
 |
K Viltersten
Joined: 10 Feb 2008 Posts: 1
|
Posted: Tue Feb 26, 2008 12:04 pm Post subject: SV: I Need a Name for a Method . . . Better than All-You-Can |
|
|
>> I need a method that always returns the default
>> value. It is similar to DefaultIfEmpty.
>>
>
> How about DefaultIfEmpty? boom tish......
What is ment by "boom tish"?
--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy |
|
| Back to top |
|
 |
Jon Skeet [C# MVP]
Joined: 08 Aug 2007 Posts: 266
|
Posted: Tue Feb 26, 2008 12:48 pm Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
jehugaleahsa@gmail.com wrote:
> I need a method that always returns the default value. It is similar
> to DefaultIfEmpty.
>
> public static IEnumerable MyMethodName()
> {
> while (true)
> {
> yield return default(T);
> }
> }
>
> Any ideas? Anything will do. Don't ask me why this is useful . . . it
> just is.
DefaultForever ?
--
Jon Skeet -
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk |
|
| Back to top |
|
 |
Lasse_Vågsæther_Karlsen
Joined: 08 Aug 2007 Posts: 12
|
Posted: Tue Feb 26, 2008 9:36 pm Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
jehugaleahsa@gmail.com wrote:
> Hello:
>
> I need a method that always returns the default value. It is similar
> to DefaultIfEmpty.
>
> public static IEnumerable MyMethodName()
> {
> while (true)
> {
> yield return default(T);
> }
> }
>
> Any ideas? Anything will do. Don't ask me why this is useful . . . it
> just is.
Limahl
--
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3 |
|
| Back to top |
|
 |
jehugaleahsa
Joined: 19 Oct 2007 Posts: 12
|
Posted: Tue Feb 26, 2008 12:39 pm Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
On Feb 26, 12:48 am, Jon Skeet [C# MVP] wrote:
> jehugalea...@gmail.com wrote:
> > I need a method that always returns the default value. It is similar
> > to DefaultIfEmpty.
>
> > public static IEnumerable MyMethodName()
> > {
> > while (true)
> > {
> > yield return default(T);
> > }
> > }
>
> > Any ideas? Anything will do. Don't ask me why this is useful . . . it
> > just is.
>
> DefaultForever ?
>
> --
> Jon Skeet - http://www.pobox.com/~skeet Blog:http://www.msmvps.com/jon.skeet
> World class .NET training in the UK:http://iterativetraining.co.uk
That is pretty much where I went.  |
|
| Back to top |
|
 |
Jeroen Mostert
Joined: 20 Dec 2007 Posts: 18
|
Posted: Wed Feb 27, 2008 1:30 am Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
jehugaleahsa@gmail.com wrote:
> Hello:
>
> I need a method that always returns the default value. It is similar
> to DefaultIfEmpty.
>
> public static IEnumerable MyMethodName()
> {
> while (true)
> {
> yield return default(T);
> }
> }
>
This is just a special case of
public static IEnumerable Repeat(T t) {
while (true) {
yield return t;
}
}
"Repeat" is the name Haskell uses for the function that creates an infinite
list of copies of its argument.
--
J. |
|
| Back to top |
|
 |
Michael C
Joined: 28 Aug 2007 Posts: 31
|
Posted: Wed Feb 27, 2008 9:23 pm Post subject: Re: I Need a Name for a Method . . . Better than All-You-Can |
|
|
"K Viltersten" wrote in message @mid.individual.net...
>>> I need a method that always returns the default value. It is similar to
>>> DefaultIfEmpty.
>>>
>
>>
>> How about DefaultIfEmpty? boom tish......
>
> What is ment by "boom tish"?
It's the noise they make on TV shows after some tells a really bad joke.
Michael
|
|
| Back to top |
|
 |
|