public bool ReadEnumNullable <T>(ref T?val) where T : struct, IConvertible { try { if (m_binaryReader.ReadBoolean()) { T value; if (MyMwcEnums.ReadEnum <T>(m_binaryReader, out value)) { val = value; } else { return(false); } } else { val = null; } return(true); } catch (Exception ex) { HandleError(ex); return(false); } }
public bool ReadEnum <T>(ref T val) where T : struct, IConvertible { try { return(MyMwcEnums.ReadEnum <T>(m_binaryReader, out val)); } catch (Exception ex) { HandleError(ex); return(false); } }