コード例 #1
0
    public static void Main(string[] args)
    {
        //<snippet11>
        // Parse an XSD gDay to create a SoapDay object.
        // The time zone of this object is +08:00.
        string  xsdDay = "---30+08:00";
        SoapDay day    = SoapDay.Parse(xsdDay);

        //</snippet11>

        //<snippet12>
        // Display the day in XSD format.
        Console.WriteLine("The day in XSD format is {0}.",
                          day.ToString());
        //</snippet12>

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

        //<snippet14>
        // Display the value of the SoapDay object.
        Console.WriteLine("The value of the SoapDay object is {0}.",
                          day.Value);
        //</snippet14>

        //<snippet16>
        // Display the XSD type string of the SoapDay class.
        Console.WriteLine("The XSD type of the class SoapDay is {0}.",
                          SoapDay.XsdType);
        //</snippet16>
    }
コード例 #2
0
ファイル: demo2.cs プロジェクト: zhamppx97/dotnet-api-docs
    static void Ctor2()
    {
        //<snippet22>
        // Create a SoapDay object.
        SoapDay day = new SoapDay(DateTime.Now);

        Console.WriteLine("The day is {0}.", day.ToString());
        //</snippet22>
    }
コード例 #3
0
ファイル: demo2.cs プロジェクト: zhamppx97/dotnet-api-docs
    static void Ctor1()
    {
        //<snippet21>
        // Create a SoapDay object.
        SoapDay day = new SoapDay();

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