Partager via


SoapNonNegativeInteger Classe

Définition

Inclut dans un wrapper un type nonNegativeInteger XSD.

public ref class SoapNonNegativeInteger sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapNonNegativeInteger : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapNonNegativeInteger : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapNonNegativeInteger = class
    interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapNonNegativeInteger = class
    interface ISoapXsd
Public NotInheritable Class SoapNonNegativeInteger
Implements ISoapXsd
Héritage
SoapNonNegativeInteger
Attributs
Implémente

Exemples

L’exemple de code suivant montre comment utiliser les membres de la SoapNonNegativeInteger classe pour effectuer une conversion entre un SoapNonNegativeInteger objet et une chaîne XSD nonNegativeInteger .

#using <System.Runtime.Remoting.dll>
using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;

int main()
{
   // Parse an XSD formatted string to create a SoapNonNegativeInteger
   // object.
   String^ xsdIntegerString = L"+13";
   SoapNonNegativeInteger^ xsdInteger = SoapNonNegativeInteger::Parse(
      xsdIntegerString );

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

   // Print the XSD type string of the SoapNonNegativeInteger object.
   Console::WriteLine( L"The XSD type of the SoapNonNegativeInteger "
   L"object is {0}.", xsdInteger->GetXsdType() );

   // Print the value of the SoapNonNegativeInteger object.
   Console::WriteLine( L"The value of the SoapNonNegativeInteger "
   L"object is {0}.", xsdInteger->Value );

   // Print the XSD type string of the SoapNonNegativeInteger class.
   Console::WriteLine( L"The XSD type of the SoapNonNegativeInteger class "
   L"is {0}.", SoapNonNegativeInteger::XsdType );
}
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD formatted string to create a SoapNonNegativeInteger
        // object.
        string xsdIntegerString = "+13";
        SoapNonNegativeInteger xsdInteger =
            SoapNonNegativeInteger.Parse(xsdIntegerString);

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

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

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

        // Print the XSD type string of the SoapNonNegativeInteger class.
        Console.WriteLine(
            "The XSD type of the SoapNonNegativeInteger class " +
            "is {0}.", SoapNonNegativeInteger.XsdType);
    }
}

Remarques

Pour plus d’informations sur les types de données XSD, consultez Référence des types de données XML.

Constructeurs

SoapNonNegativeInteger()

Initialise une nouvelle instance de la classe SoapNonNegativeInteger.

SoapNonNegativeInteger(Decimal)

Initialise une nouvelle instance de la classe SoapNonNegativeInteger avec une valeur Decimal.

Propriétés

Value

Obtient ou définit la valeur numérique de l'instance actuelle.

XsdType

Obtient le langage XSD (XML Schema Definition) du type SOAP en cours.

Méthodes

Equals(Object)

Détermine si l'objet spécifié est égal à l'objet actuel.

(Hérité de Object)
GetHashCode()

Fait office de fonction de hachage par défaut.

(Hérité de Object)
GetType()

Obtient le Type de l'instance actuelle.

(Hérité de Object)
GetXsdType()

Retourne le langage XSD (XML Schema Definition) du type SOAP en cours.

MemberwiseClone()

Crée une copie superficielle du Object actuel.

(Hérité de Object)
Parse(String)

Convertit le String spécifié en un objet SoapNonNegativeInteger.

ToString()

Retourne une Value comme String.

S’applique à