зеркало из https://github.com/stride3d/SharpYaml.git
Merge pull request #11 from martindevans/master
Fixed failing decimal serialization
This commit is contained in:
Коммит
337cc48c78
|
@ -203,7 +203,9 @@ Value: World!
|
|||
|
||||
public ulong UInt64 { get; set; }
|
||||
|
||||
public float Float { get; set; }
|
||||
public decimal Decimal { get; set; }
|
||||
|
||||
public float Float { get; set; }
|
||||
|
||||
public double Double { get; set; }
|
||||
|
||||
|
@ -235,6 +237,7 @@ ArrayContent: [1, 2]
|
|||
Bool: true
|
||||
BoolFalse: false
|
||||
Byte: 2
|
||||
Decimal: 4623451.0232342352463856744563
|
||||
Double: 6.6
|
||||
Enum: B
|
||||
EnumWithFlags: A, B
|
||||
|
|
|
@ -235,7 +235,7 @@ namespace SharpYaml.Serialization.Serializers
|
|||
text = AppendDecimalPoint(((double)value).ToString("R", CultureInfo.InvariantCulture));
|
||||
break;
|
||||
case TypeCode.Decimal:
|
||||
text = AppendDecimalPoint(((decimal)value).ToString("R", CultureInfo.InvariantCulture));
|
||||
text = AppendDecimalPoint(((decimal)value).ToString("G", CultureInfo.InvariantCulture));
|
||||
break;
|
||||
case TypeCode.DateTime:
|
||||
text = ((DateTime) value).ToString("o", CultureInfo.InvariantCulture);
|
||||
|
|
Загрузка…
Ссылка в новой задаче