示例#1
0
    public static void Main(string[] args)
    {
        // Parse an XSD formatted string to create a SoapNonPositiveInteger
        // object.
        string xsdIntegerString           = "-13";
        SoapNonPositiveInteger xsdInteger =
            SoapNonPositiveInteger.Parse(xsdIntegerString);

        // Print the value of the SoapNonPositiveInteger object
        // in XSD format.
        Console.WriteLine(
            "The SoapNonPositiveInteger object in XSD format is {0}.",
            xsdInteger.ToString());

        // Print the XSD type string of the SoapNonPositiveInteger object.
        Console.WriteLine(
            "The XSD type of the SoapNonPositiveInteger " +
            "object is {0}.", xsdInteger.GetXsdType());

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

        // Print the XSD type string of the SoapNonPositiveInteger class.
        Console.WriteLine(
            "The XSD type of the SoapNonPositiveInteger class " +
            "is {0}.", SoapNonPositiveInteger.XsdType);
    }
示例#2
0
    static void Ctor1()
    {
        //<snippet21>
        // Create a SoapNonPositiveInteger object.
        SoapNonPositiveInteger xsdInteger =
            new SoapNonPositiveInteger();

        xsdInteger.Value = -14;
        Console.WriteLine(
            "The value of the SoapNonPositiveInteger object is {0}.",
            xsdInteger.ToString());
        //</snippet21>
    }
示例#3
0
    static void Ctor2()
    {
        //<snippet22>
        // Create a SoapNonPositiveInteger object.
        decimal decimalValue = -14;
        SoapNonPositiveInteger xsdInteger =
            new SoapNonPositiveInteger(decimalValue);

        Console.WriteLine(
            "The value of the SoapNonPositiveInteger object is {0}.",
            xsdInteger.ToString());
        //</snippet22>
    }