Changeset 138 for trunk/sources/HeuristicLab.Constraints
- Timestamp:
- 04/20/08 10:56:51 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraint.cs
r2 r138 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using System.Globalization; 28 29 29 30 namespace HeuristicLab.Constraints { … … 135 136 XmlNode node = base.GetXmlNode(name, document, persistedObjects); 136 137 XmlAttribute lb = document.CreateAttribute("LowerBound"); 137 lb.Value = LowerBound +"";138 lb.Value = LowerBound.ToString(CultureInfo.InvariantCulture); 138 139 XmlAttribute lbi = document.CreateAttribute("LowerBoundIncluded"); 139 lbi.Value = lowerBoundIncluded +"";140 lbi.Value = lowerBoundIncluded.ToString(); 140 141 XmlAttribute lbe = document.CreateAttribute("LowerBoundEnabled"); 141 lbe.Value = lowerBoundEnabled + "";142 lbe.Value = lowerBoundEnabled.ToString(); 142 143 XmlAttribute ub = document.CreateAttribute("UpperBound"); 143 ub.Value = upperBound + "";144 ub.Value = upperBound.ToString(CultureInfo.InvariantCulture); 144 145 XmlAttribute ubi = document.CreateAttribute("UpperBoundIncluded"); 145 ubi.Value = upperBoundIncluded + "";146 ubi.Value = upperBoundIncluded.ToString(); 146 147 XmlAttribute ube = document.CreateAttribute("UpperBoundEnabled"); 147 ube.Value = upperBoundEnabled + "";148 ube.Value = upperBoundEnabled.ToString(); 148 149 node.Attributes.Append(lb); 149 150 if (!lowerBoundIncluded) node.Attributes.Append(lbi); … … 157 158 public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) { 158 159 base.Populate(node, restoredObjects); 159 lowerBound = double.Parse(node.Attributes["LowerBound"].Value );160 lowerBound = double.Parse(node.Attributes["LowerBound"].Value, CultureInfo.InvariantCulture); 160 161 if (node.Attributes["LowerBoundIncluded"] != null) { 161 162 lowerBoundIncluded = bool.Parse(node.Attributes["LowerBoundIncluded"].Value); … … 169 170 } 170 171 171 upperBound = double.Parse(node.Attributes["UpperBound"].Value );172 upperBound = double.Parse(node.Attributes["UpperBound"].Value, CultureInfo.InvariantCulture); 172 173 if (node.Attributes["UpperBoundIncluded"] != null) { 173 174 upperBoundIncluded = bool.Parse(node.Attributes["UpperBoundIncluded"].Value);
Note: See TracChangeset
for help on using the changeset viewer.