コード例 #1
0
    public static void Main(string[] args)
    {
        // Parse an XSD gYear to create a SoapYear object.
        // The time zone of this object is -08:00.
        string   xsdYear = "2003-08:00";
        SoapYear year    = SoapYear.Parse(xsdYear);

        // Print the year in XSD format.
        Console.WriteLine("The year in XSD format is {0}.",
                          year.ToString());

        // Print the XSD type string of this particular SoapYear object.
        Console.WriteLine("The XSD type of the SoapYear object is {0}.",
                          year.GetXsdType());

        // Print the value of the SoapYear object.
        Console.WriteLine("The value of the SoapYear object is {0}.",
                          year.Value);

        // Print the sign of the SoapYear object.
        Console.WriteLine("The sign of the SoapYear object is {0}.",
                          year.Sign);

        // Print the XSD type string of the SoapYear class.
        Console.WriteLine("The XSD type of the class SoapYear is {0}.",
                          SoapYear.XsdType);
    }
コード例 #2
0
ファイル: demo2.cs プロジェクト: zhimaqiao51/docs
    static void Ctor3()
    {
        //<snippet23>
        // Create a SoapYear object with a positive sign.
        SoapYear year = new SoapYear(DateTime.Now, 1);

        Console.WriteLine("The year is {0}.", year.ToString());
        //</snippet23>
    }
コード例 #3
0
ファイル: demo2.cs プロジェクト: zhimaqiao51/docs
    static void Ctor2()
    {
        //<snippet22>
        // Create a SoapYear object.
        SoapYear year = new SoapYear(DateTime.Now);

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

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