Bloom.Collection.CollectionSettings.GetDecimalValue C# (CSharp) Method

GetDecimalValue() private method

private GetDecimalValue ( System.Xml.Linq.XElement library, string id, decimal defaultValue ) : decimal
library System.Xml.Linq.XElement
id string
defaultValue decimal
return decimal
        private decimal GetDecimalValue(XElement library, string id, decimal defaultValue)
        {
            var s = GetValue(library, id, defaultValue.ToString(CultureInfo.InvariantCulture));
            decimal d;
            // REVIEW: if we localize the display of decimal values in the line-height combo box, then this
            // needs to handle the localized version of the number.  (This happens automatically by removing
            // the middle two arguments.)
            decimal.TryParse(s, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out d);
            return d;
        }