0

What is a one line expression I can use to check if response.TrackReply.HighestSeverity is null or of type NotificantionSeverityType? I'm getting an Error with the code below when response.TrackReply.HighestSeverity is null. I would like to set it to null when it is null and when it is of type NotificationEventType to the appropriate enum string value.

static void Main(string[] args)
        {
            string HighestSeverity = Enum.GetName(response.TrackReply.HighestSeverity);
        }
    }

    public enum NotificationSeverityType
    {

        /// <remarks/>
        ERROR,

        /// <remarks/>
        FAILURE,

        /// <remarks/>
        NOTE,

        /// <remarks/>
        SUCCESS,

        /// <remarks/>
        WARNING,
    }

0 Answers0