SoapYear Class

 

Wraps an XSD gYear type.

Namespace:   System.Runtime.Remoting.Metadata.W3cXsd2001
Assembly:  mscorlib (in mscorlib.dll)

System::Object
  System.Runtime.Remoting.Metadata.W3cXsd2001::SoapYear

[SerializableAttribute]
[ComVisibleAttribute(true)]
public ref class SoapYear sealed : ISoapXsd

NameDescription
System_CAPS_pubmethodSoapYear()

Initializes a new instance of the SoapYear class.

System_CAPS_pubmethodSoapYear(DateTime)

Initializes a new instance of the SoapYear class with a specified DateTime object.

System_CAPS_pubmethodSoapYear(DateTime, Int32)

Initializes a new instance of the SoapYear class with a specified DateTime object and an integer that indicates whether Value is a positive or negative value.

NameDescription
System_CAPS_pubpropertySign

Gets or sets whether the date and time of the current instance is positive or negative.

System_CAPS_pubpropertyValue

Gets or sets the date and time of the current instance.

System_CAPS_pubpropertySystem_CAPS_staticXsdType

Gets the XML Schema definition language (XSD) of the current SOAP type.

NameDescription
System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodGetXsdType()

Returns the XML Schema definition language (XSD) of the current SOAP type.

System_CAPS_pubmethodSystem_CAPS_staticParse(String^)

Converts the specified String into a SoapYear object.

System_CAPS_pubmethodToString()

Returns Value as a String.(Overrides Object::ToString().)

For more information about XSD data types, see "XML Data Types Reference" in the MSDN Library at http://msdn.microsoft.com/library.

The following code example demonstrates using the SoapYear class to wrap the XSD gYear type.

using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;

int main()
{
   // Parse an XSD date to create a SoapYear object.
   String^ xsdDate = "2003";
   SoapYear^ date = SoapYear::Parse( xsdDate );

   // Serialize a DateTime object as an XSD date string.
   Console::WriteLine( "The date in XSD format is {0}.",
      date );

   // Print out the XSD type string of this particular SoapYear object.
   Console::WriteLine( "The XSD type of the SoapYear instance is {0}.",
      date->GetXsdType() );

   // Print out the value of the SoapYear object.
   Console::WriteLine( "The value of the SoapYear instance is {0}.",
      date->Value );

   // Print out the sign of the SoapYear object.
   Console::WriteLine( "The sign of the SoapYear instance is {0}.",
      date->Sign );

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

.NET Framework
Available since 1.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: