예제 #1
0
        private string GetPrintableValue()
        {
            if (ValueType.IsClassOrStruct())
            {
                return($"new {ValueType.ToPrintableString()}()");
            }

            if (ValueType == typeof(string))
            {
                return(Wrap(Value.ToString()));
            }

            if (ValueType == typeof(float))
            {
                return($"{Value}f");
            }

            if (ValueType == typeof(double))
            {
                return($"{Value}d");
            }

            if (ValueType == typeof(long))
            {
                return($"{Value}L");
            }

            if (ValueType == typeof(decimal))
            {
                return($"{Value}m");
            }

            return(Value.ToString());
        }