Opc.Ua.JsonDecoder.ReadSByte C# (CSharp) 메소드

ReadSByte() 공개 메소드

Reads a sbyte from the stream.
public ReadSByte ( string fieldName ) : sbyte
fieldName string
리턴 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;
        }