Fixing bug that prevented enums from being parsed from xml properly

This commit is contained in:
Chris Cameron
2017-07-02 11:07:16 -04:00
parent 1c52eca1dd
commit 438b220a4d

View File

@@ -592,8 +592,8 @@ namespace ICD.Common.Utils.Xml
public static T? TryReadChildElementContentAsEnum<T>(string xml, string childElement, bool ignoreCase)
where T : struct
{
T? output;
return !TryReadChildElementContentAsEnum(xml, childElement, ignoreCase, out output) ? null : output;
T output;
return TryReadChildElementContentAsEnum(xml, childElement, ignoreCase, out output) ? output : (T?)null;
}
/// <summary>