Beispiel #1
0
    public static void Main(string[] args)
    {
        //<snippet11>
        // Parse an XSD gMonthDay to create a SoapMonthDay object.
        // Parse the representation for February 21, in the UTC+8 time zone.
        string       xsdMonthDay = "--02-21+08:00";
        SoapMonthDay monthDay    = SoapMonthDay.Parse(xsdMonthDay);

        //</snippet11>

        //<snippet12>
        // Print the monthDay in XSD format.
        Console.WriteLine("The SoapMonthDay object in XSD format is {0}.",
                          monthDay.ToString());
        //</snippet12>

        //<snippet13>
        // Print the XSD type string of this particular SoapMonthDay object.
        Console.WriteLine("The XSD type of the SoapMonthDay object is {0}.",
                          monthDay.GetXsdType());
        //</snippet13>

        //<snippet14>
        // Print the value of the SoapMonthDay object.
        Console.WriteLine("The value of the SoapMonthDay object is {0}.",
                          monthDay.Value);
        //</snippet14>

        //<snippet16>
        // Print the XSD type string of the SoapMonthDay class.
        Console.WriteLine("The XSD type of the class SoapMonthDay is {0}.",
                          SoapMonthDay.XsdType);
        //</snippet16>
    }
Beispiel #2
0
    static void Ctor2()
    {
        //<snippet22>
        // Create a SoapMonthDay object.
        SoapMonthDay monthDay = new SoapMonthDay(DateTime.Now);

        Console.WriteLine("The SoapMonthDay object is {0}.",
                          monthDay.ToString());
        //</snippet22>
    }
Beispiel #3
0
    static void Ctor1()
    {
        //<snippet21>
        // Create a SoapMonthDay object.
        SoapMonthDay monthDay = new SoapMonthDay();

        monthDay.Value = DateTime.Now;
        Console.WriteLine("The SoapMonthDay object is {0}.",
                          monthDay.ToString());
        //</snippet21>
    }