//End Add ///// <summary> ///// Returns the RegularExpression string which can be used for validating ///// using a RegularExpressionValidator. ///// </summary> //virtual public string ValidationRegularExpression //{ // get // { // StringBuilder regexp = new StringBuilder(); // // if (AllowNegatives) // regexp.Append("([-]|[0-9])"); // // regexp.Append("[0-9]*"); // // if (DecimalPlaces > 0) // { // regexp.Append("(["); // regexp.Append(DecimalSymbol); // regexp.Append("]|[0-9]){0,1}[0-9]{0,"); // regexp.Append(DecimalPlaces.ToString()); // regexp.Append("}$"); // } // // return regexp.ToString(); // } //} /// <summary> /// Parse a String to a Double /// </summary> /// <param name="s">string to be parsed to a double</param> /// <returns>double value</returns> virtual protected double ParseStringToDouble(string s) { s = s.Replace(DecimalSymbol.ToString(), "."); return(double.Parse(s)); }