|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;
namespace NumberFormatterExample
{
[DataContract]
public class NumberFormatInfo
{
[DataMember]
public string NegativeSign { get; set; }
[DataMember]
public int NumberDecimalDigits { get; set; }
[DataMember]
public string NumberDecimalSeparator { get; set; }
[DataMember]
public string NumberGroupSeparator { get; set; }
[DataMember]
public int NumberGroupSizes { get; set; }
[DataMember]
public int NumberNegativePattern { get; set; }
public NumberFormatInfo()
{
}
public NumberFormatInfo(System.Globalization.NumberFormatInfo infos)
{
this.NegativeSign = infos.NegativeSign;
this.NumberDecimalDigits = infos.NumberDecimalDigits;
this.NumberDecimalSeparator = infos.NumberDecimalSeparator;
this.NumberGroupSeparator = infos.NumberGroupSeparator;
if(infos.NumberGroupSizes.Length > 0)
this.NumberGroupSizes = infos.NumberGroupSizes[0];
this.NumberNegativePattern = infos.NumberNegativePattern;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
From the beginning i have always been passionate about everything. I have never actually studied in computer programming but life brought me in IT departments from the beginning of my career. The more i programmed the more i liked it. Ever since, i've been hooked.