InnerException

 catch (System.InvalidOperationException ex)

                {

                    System.Console.WriteLine("[XmlSerializer ctor] " + ex.Message);

                    var inner = ex.InnerException;

                    int depth = 1;

                    while (inner != null)

                    {

                        System.Console.WriteLine($"  Inner[{depth}]: {inner.GetType().Name} - {inner.Message}");

                        inner = inner.InnerException;

                        depth++;

                    }

                    throw;

                }

留言