public byte GetByte()

in src/nms-api/Util/PrimitiveMapInterceptor.cs [190:213]


        public byte GetByte(string key)
        {
            Object value = GetObjectProperty(key);

            try
            {
                if (value is Byte)
                {
                    return (byte) value;
                }
                else if (value is String)
                {
                    return Convert.ToByte(value);
                }
                else
                {
                    throw new MessageFormatException(" cannot read a byte from " + value.GetType().Name);
                }
            }
            catch (FormatException ex)
            {
                throw NMSExceptionSupport.CreateMessageFormatException(ex);
            }
        }