SoapYear Class
Wraps an XSD gYear type.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | SoapYear() | Initializes a new instance of the SoapYear class. |
![]() | SoapYear(DateTime) | Initializes a new instance of the SoapYear class with a specified DateTime object. |
![]() | SoapYear(DateTime, Int32) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | GetXsdType() | Returns the XML Schema definition language (XSD) of the current SOAP type. |
![]() ![]() | Parse(String^) | Converts the specified String into a SoapYear object. |
![]() | ToString() | 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 ); }
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.


