Answers for "c# get Full Exception message if InnerException is not NULL"

0

c# get Full Exception message if InnerException is not NULL

public static string GetFullMessage(this Exception ex)
        {
            return ex.InnerException == null
                 ? ex.Message
                 : ex.Message + " --> " + ex.InnerException.GetFullMessage();
        }
Posted by: Guest on January-05-2022

Browse Popular Code Answers by Language