public static void Main(string[] args) { //<snippet11> // Parse an XSD gTime to create a SoapTime object. // The time zone of this object is the current time zone. string xsdTime = "12:13:14.123Z"; SoapTime time = SoapTime.Parse(xsdTime); //</snippet11> //<snippet12> // Display the time in XSD format. Console.WriteLine("The time in XSD format is {0}.", time.ToString()); //</snippet12> //<snippet13> // Display the XSD type string of this particular SoapTime object. Console.WriteLine("The XSD type of the SoapTime object is {0}.", time.GetXsdType()); //</snippet13> //<snippet14> // Display the value of the SoapTime object. Console.WriteLine("The value of the SoapTime object is {0}.", time.Value); //</snippet14> //<snippet16> // Display the XSD type string of the SoapTime class. Console.WriteLine("The XSD type of the class SoapTime is {0}.", SoapTime.XsdType); //</snippet16> }
static void Ctor2() { //<snippet22> // Create a SoapTime object. SoapTime time = new SoapTime(DateTime.Now); Console.WriteLine("The time is {0}.", time.ToString()); //</snippet22> }
static void Ctor1() { //<snippet21> // Create a SoapTime object. SoapTime time = new SoapTime(); time.Value = DateTime.Now; Console.WriteLine("The time is {0}.", time.ToString()); //</snippet21> }