Opc.Ua.JsonDecoder.ReadSByte C# (CSharp) Method

ReadSByte() public method

Reads a sbyte from the stream.
public ReadSByte ( string fieldName ) : sbyte
fieldName string
return sbyte
        public sbyte ReadSByte(string fieldName)
        {
            object token = null;

            if (!ReadField(fieldName, out token))
            {
                return 0;
            }

            var value = token as long?;

            if (value == null)
            {
                return 0;
            }

            if (value < SByte.MinValue || value > SByte.MaxValue)
            {
                return 0;
            }

            return (sbyte)value;
        }