public static bool FieldHandler(byte[] fieldValueBytes, out string fieldTypeString, out string fieldValueString)
        {
            bool outcome = false;

            string valueString = BitConverter.ToString(fieldValueBytes).Replace("-", "");

            FieldType fieldType  = FieldType.BinHex;
            string    fieldValue = valueString;

            FieldType r_outputFieldType  = fieldType;
            string    r_outputFieldValue = fieldValue;

            // determine valid field type
            if (TryParse(fieldValueBytes, out r_outputFieldType, out r_outputFieldValue) == true)
            {
                //Console.WriteLine("Found type");

                fieldType  = r_outputFieldType;
                fieldValue = r_outputFieldValue;

                outcome = true;
            }

            fieldTypeString  = FieldHandling.GetTypeName(fieldType);
            fieldValueString = fieldValue;

            //Console.WriteLine($"FieldHandler:\n\tType: {fieldTypeString}\n\tValue: {fieldValueString}");

            return(outcome);
        }
        public static bool TryParse(byte[] value, out FieldType fieldType, out string fieldValue)
        {
            bool outcome = false;

            T Deserialize <T>(byte[] inputValue, FieldType inputType)
            {
                outcome = true;

                var output = FieldHandling.Deserialize <T>(inputType, inputValue);

                return(output);
            }

            fieldType  = FieldType.BinHex;
            fieldValue = "";

            byte preTrail = 0;
            byte trail    = 0;

            if (value.Length > 1)
            {
                trail = value[value.Length - 1];

                if (value.Length > 2)
                {
                    preTrail = value[value.Length - 2];
                }
            }

            if (value.Length == 1)
            {
                if (value[0] > 1 &&
                    value[0] != 255)
                {
                    fieldType  = FieldType.Int8;
                    fieldValue = Deserialize <sbyte>(value, fieldType).ToString();
                }
            }
            else if (value.Length == 2)
            {
                fieldType  = FieldType.Int16;
                fieldValue = Deserialize <short>(value, fieldType).ToString();
            }
            else
            {
                //if (value.Length > 4 && trail == 0 && preTrail > 0x29 && preTrail != 0x40)
                if (value.Length > 4 && trail == 0 && preTrail > 0)
                {
                    //Utility.Log($"String field\n\tTrailing byte: {trail}\n\tPre-trailing byte: {preTrail}");
                    //Utility.Log($"{BitConverter.ToString(value).Replace("-", " ")}\n\tTrailing byte: {trail}\n\tPre-trailing byte: {preTrail}");

                    fieldType  = FieldType.String;
                    fieldValue = Deserialize <string>(value, fieldType);
                }
            }

            fieldValue = fieldValue.ToString();

            //PostProcessField(fieldValue, fieldType, value.Length, out fieldValue, out fieldType);
            //fieldValue = FieldHandling.Deserialize<string>(fieldType, value);
            //outcome = true;

            return(outcome);
        }