Click here to Skip to main content
15,881,882 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
RantOutlook -- "you replied on..." Pin
Marc Clifton26-Jan-22 8:16
mvaMarc Clifton26-Jan-22 8:16 
GeneralRe: Outlook -- "you replied on..." Pin
David O'Neil26-Jan-22 8:21
professionalDavid O'Neil26-Jan-22 8:21 
GeneralRe: Outlook -- "you replied on..." Pin
kmoorevs26-Jan-22 8:26
kmoorevs26-Jan-22 8:26 
GeneralRe: Outlook -- "you replied on..." Pin
Marc Clifton26-Jan-22 8:30
mvaMarc Clifton26-Jan-22 8:30 
GeneralRe: Outlook -- "you replied on..." Pin
dan!sh 26-Jan-22 20:27
professional dan!sh 26-Jan-22 20:27 
GeneralRe: Outlook -- "you replied on..." Pin
Sander Rossel26-Jan-22 23:29
professionalSander Rossel26-Jan-22 23:29 
GeneralRe: Outlook -- "you replied on..." Pin
rnbergren27-Jan-22 2:48
rnbergren27-Jan-22 2:48 
GeneralA nights sleep works wonders. Pin
OriginalGriff25-Jan-22 22:46
mveOriginalGriff25-Jan-22 22:46 
Started this morning, created a new basic class, added IEnumerable<T> to it, implemented teh required interface methods via VS, added tiny fragment of code to each method:
C#
public IEnumerator<int> GetEnumerator()
    {
    for (int i = Min; i <= Max; i++)
        {
        yield return i;
        }
    }

IEnumerator IEnumerable.GetEnumerator()
    {
    return this.GetEnumerator();
    }
And tested it.

It works: foreach and Linq all work perfectly.

Why was it a problem? Because I added IEnumerable to the class first yesterday, and that confuses the issue when you try to add IEnumerable<T> later ...

Now I can rip out all the enumeration code from the "real" classes and do the job simply.

Sometimes, I get too focussed on what I am doing to see the wood for the trees ... or I'm an idiot. Both, possibly. Sigh | :sigh:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: A nights sleep works wonders. Pin
Slacker00726-Jan-22 3:22
professionalSlacker00726-Jan-22 3:22 
GeneralRe: A nights sleep works wonders. Pin
Sander Rossel26-Jan-22 5:33
professionalSander Rossel26-Jan-22 5:33 
GeneralRe: A nights sleep works wonders. Pin
Richard MacCutchan26-Jan-22 6:11
mveRichard MacCutchan26-Jan-22 6:11 
GeneralRe: A nights sleep works wonders. Pin
Mike Hankey26-Jan-22 6:18
mveMike Hankey26-Jan-22 6:18 
GeneralRe: A nights sleep works wonders. Pin
OriginalGriff26-Jan-22 6:29
mveOriginalGriff26-Jan-22 6:29 
GeneralRe: A nights sleep works wonders. Pin
Mike Hankey26-Jan-22 6:44
mveMike Hankey26-Jan-22 6:44 
GeneralRe: A nights sleep works wonders. Pin
DRHuff26-Jan-22 11:14
DRHuff26-Jan-22 11:14 
GeneralRe: A nights sleep works wonders. Pin
OriginalGriff26-Jan-22 11:32
mveOriginalGriff26-Jan-22 11:32 
GeneralRe: A nights sleep works wonders. Pin
kmoorevs26-Jan-22 10:07
kmoorevs26-Jan-22 10:07 
GeneralWSO CCC OTD 2022-01-26 Pin
Randor 25-Jan-22 22:21
professional Randor 25-Jan-22 22:21 
GeneralRe: WSO CCC OTD 2022-01-26 Pin
pkfox25-Jan-22 22:58
professionalpkfox25-Jan-22 22:58 
GeneralRe: WSO CCC OTD 2022-01-26 Pin
DerekT-P26-Jan-22 1:03
professionalDerekT-P26-Jan-22 1:03 
PraiseRe: WSO CCC OTD 2022-01-26 - Winner Pin
Randor 26-Jan-22 1:19
professional Randor 26-Jan-22 1:19 
GeneralRe: WSO CCC OTD 2022-01-26 Pin
pkfox26-Jan-22 20:56
professionalpkfox26-Jan-22 20:56 
GeneralRe: WSO CCC OTD 2022-01-26 Pin
Randor 26-Jan-22 21:08
professional Randor 26-Jan-22 21:08 
GeneralRe: WSO CCC OTD 2022-01-26 Pin
pkfox26-Jan-22 21:40
professionalpkfox26-Jan-22 21:40 
GeneralRe: WSO CCC OTD 2022-01-26 Pin
Randor 26-Jan-22 21:58
professional Randor 26-Jan-22 21:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.