System.Xml.Xsl.Runtime.XsltLibrary.FormatNumberDynamic C# (CSharp) Method

FormatNumberDynamic() public method

public FormatNumberDynamic ( double value, string formatPicture, XmlQualifiedName decimalFormatName, string errorMessageName ) : string
value double
formatPicture string
decimalFormatName XmlQualifiedName
errorMessageName string
return string
        public string FormatNumberDynamic(double value, string formatPicture, XmlQualifiedName decimalFormatName, string errorMessageName)
        {
            DecimalFormat format;
            if (_decimalFormats == null || !_decimalFormats.TryGetValue(decimalFormatName, out format))
            {
                throw new XslTransformException(SR.Xslt_NoDecimalFormat, errorMessageName);
            }

            DecimalFormatter formatter = new DecimalFormatter(formatPicture, format);
            return formatter.Format(value);
        }