SoapDate Class
Wraps an XSD date type.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | SoapDate() | Initializes a new instance of the SoapDate class. |
![]() | SoapDate(DateTime) | Initializes a new instance of the SoapDate class with a specified DateTime object. |
![]() | SoapDate(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 SoapDate 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 SoapDate class to wrap an XML date type.
using namespace System; using namespace System::Runtime::Remoting::Metadata::W3cXsd2001; int main() { // Parse an XSD date to create a SoapDate object. String^ xsdDate = "2003-02-04"; SoapDate^ date = SoapDate::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 SoapDate object. Console::WriteLine( "The XSD type of the SoapDate instance is {0}.", date->GetXsdType() ); // Print out the value of the SoapDate object. Console::WriteLine( "The value of the SoapDate instance is {0}.", date->Value ); // Print out the sign of the SoapDate object. Console::WriteLine( "The sign of the SoapDate instance is {0}.", date->Sign ); // Print out the XSD type string of the SoapDate class. Console::WriteLine( "The XSD type of SoapDate is {0}.", SoapDate::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.


