Click here to Skip to main content
15,911,489 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.

 
GeneralRe: This is a programming question Pin
PIEBALDconsult20-Jun-14 11:07
mvePIEBALDconsult20-Jun-14 11:07 
GeneralRe: This is a programming question Pin
Eddy Vluggen20-Jun-14 11:19
professionalEddy Vluggen20-Jun-14 11:19 
GeneralRe: This is a programming question Pin
PIEBALDconsult20-Jun-14 11:34
mvePIEBALDconsult20-Jun-14 11:34 
GeneralRe: This is a programming question Pin
Tim Carmichael20-Jun-14 15:17
Tim Carmichael20-Jun-14 15:17 
GeneralRe: This is a programming question Pin
PIEBALDconsult20-Jun-14 15:45
mvePIEBALDconsult20-Jun-14 15:45 
AnswerRe: This is a programming question Pin
Super Lloyd20-Jun-14 16:01
Super Lloyd20-Jun-14 16:01 
GeneralRe: This is a programming question Pin
PIEBALDconsult20-Jun-14 16:05
mvePIEBALDconsult20-Jun-14 16:05 
AnswerRe: This is a programming question Pin
Super Lloyd20-Jun-14 17:28
Super Lloyd20-Jun-14 17:28 
Well, if my English and the documentation didn't work for you, maybe the code will?

C#
class Program
{
    static void Main(string[] args)
    {
        Do(() => M(null, "one"));
        Do(() => M(() => M(() => M(null, "three"), "two"), "one"));
        Console.ReadLine();
    }

    static void M(Action a, string err)
    {
        try { if (a != null) a(); }
        catch (Exception e) { throw new Exception(err, e); }
        throw new Exception(err);
    }
    static void Do(Action a)
    {
        try
        {
            a();
            Console.WriteLine("All Good");
        }
        catch(Exception e)
        {
            var @base = e.GetBaseException();
            var top = e;
            while (top.InnerException != null)
                top = top.InnerException;
            Console.WriteLine("Exceptions!\t e == base {0}, top == base {1}", e == @base, top == @base);
        }
    }
}

My programming get away... The Blog...
DirectX for WinRT/C# since 2013!
Taking over the world since 1371!

GeneralRe: This is a programming question Pin
PIEBALDconsult20-Jun-14 17:42
mvePIEBALDconsult20-Jun-14 17:42 
GeneralRe: This is a programming question Pin
Super Lloyd20-Jun-14 17:58
Super Lloyd20-Jun-14 17:58 
GeneralRe: This is a programming question Pin
PIEBALDconsult20-Jun-14 18:01
mvePIEBALDconsult20-Jun-14 18:01 
GeneralRe: This is a programming question Pin
Super Lloyd20-Jun-14 19:16
Super Lloyd20-Jun-14 19:16 
GeneralRe: This is a programming question Pin
Ravi Bhavnani20-Jun-14 19:49
professionalRavi Bhavnani20-Jun-14 19:49 
GeneralRe: This is a programming question Pin
Chris C-B20-Jun-14 23:15
Chris C-B20-Jun-14 23:15 
GeneralThe video speaks for itself! Pin
DaveAuld20-Jun-14 8:35
professionalDaveAuld20-Jun-14 8:35 
GeneralRe: The video speaks for itself! Pin
JMK-NI20-Jun-14 10:28
professionalJMK-NI20-Jun-14 10:28 
GeneralRe: The video speaks for itself! Pin
Roger Wright20-Jun-14 18:36
professionalRoger Wright20-Jun-14 18:36 
GeneralAdmit it NOW Pin
Mark Parity20-Jun-14 5:29
Mark Parity20-Jun-14 5:29 
GeneralRe: Admit it NOW Pin
OriginalGriff20-Jun-14 5:32
mveOriginalGriff20-Jun-14 5:32 
GeneralRe: Admit it NOW Pin
Kenneth Haugland20-Jun-14 5:39
mvaKenneth Haugland20-Jun-14 5:39 
GeneralRe: Admit it NOW Pin
OriginalGriff20-Jun-14 5:40
mveOriginalGriff20-Jun-14 5:40 
GeneralRe: Admit it NOW Pin
Kenneth Haugland20-Jun-14 5:44
mvaKenneth Haugland20-Jun-14 5:44 
GeneralRe: Admit it NOW Pin
Richard Deeming20-Jun-14 5:50
mveRichard Deeming20-Jun-14 5:50 
GeneralRe: Admit it NOW Pin
Duncan Edwards Jones20-Jun-14 5:44
professionalDuncan Edwards Jones20-Jun-14 5:44 
GeneralRe: Admit it NOW Pin
OriginalGriff20-Jun-14 5:48
mveOriginalGriff20-Jun-14 5:48 

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.