Inheritance: ISoapXsd
Ejemplo n.º 1
0
        /// <summary>Converts the specified <see cref="T:System.String" /> into a <see cref="T:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear" /> object.</summary>
        /// <returns>A <see cref="T:System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear" /> object that is obtained from <paramref name="value" />.</returns>
        /// <param name="value">The <see cref="T:System.String" /> to convert. </param>
        /// <exception cref="T:System.Runtime.Remoting.RemotingException">
        ///   <paramref name="value" /> does not contain a date and time that corresponds to any of the recognized format patterns. </exception>
        public static SoapYear Parse(string value)
        {
            DateTime value2   = DateTime.ParseExact(value, SoapYear._datetimeFormats, null, DateTimeStyles.None);
            SoapYear soapYear = new SoapYear(value2);

            if (value.StartsWith("-"))
            {
                soapYear.Sign = -1;
            }
            else
            {
                soapYear.Sign = 0;
            }
            return(soapYear);
        }
Ejemplo n.º 2
0
        public static SoapYear Parse(string value)
        {
            DateTime d = DateTime.ParseExact(value, _datetimeFormats, null, DateTimeStyles.None);

            SoapYear res = new SoapYear(d);

            if (value.StartsWith("-"))
            {
                res.Sign = -1;
            }
            else
            {
                res.Sign = 0;
            }
            return(res);
        }
Ejemplo n.º 3
0
		public static SoapYear Parse (string value)
		{
			DateTime d = DateTime.ParseExact (value, _datetimeFormats, null, DateTimeStyles.None);
			
			SoapYear res = new SoapYear (d);
			if (value.StartsWith ("-")) res.Sign = -1;
			else res.Sign = 0;
			return res;
		}