SoapMonthDay Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Wraps an XSD gMonthDay
type.
public ref class SoapMonthDay sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapMonthDay : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapMonthDay : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapMonthDay = class
interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapMonthDay = class
interface ISoapXsd
Public NotInheritable Class SoapMonthDay
Implements ISoapXsd
- Inheritance
-
SoapMonthDay
- Attributes
- Implements
Examples
The following code example shows how to use the members in the SoapMonthDay class to convert between a SoapMonthDay object and an XSD gMonthDay
string.
#using <System.dll>
#using <System.Runtime.Remoting.dll>
using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;
int main()
{
// Parse an XSD gMonthDay to create a SoapMonthDay object.
// Parse the representation for February 21, in the UTC+8 time zone.
String^ xsdMonthDay = L"--02-21+08:00";
SoapMonthDay^ monthDay = SoapMonthDay::Parse( xsdMonthDay );
// Print the monthDay in XSD format.
Console::WriteLine( L"The SoapMonthDay object in XSD format is {0}.",
monthDay );
// Print the XSD type string of this particular SoapMonthDay object.
Console::WriteLine( L"The XSD type of the SoapMonthDay object is {0}.",
monthDay->GetXsdType() );
// Print the value of the SoapMonthDay object.
Console::WriteLine( L"The value of the SoapMonthDay object is {0}.",
monthDay->Value );
// Print the XSD type string of the SoapMonthDay class.
Console::WriteLine( L"The XSD type of the class SoapMonthDay is {0}.",
SoapMonthDay::XsdType );
}
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
public class Demo
{
public static void Main(string[] args)
{
// Parse an XSD gMonthDay to create a SoapMonthDay object.
// Parse the representation for February 21, in the UTC+8 time zone.
string xsdMonthDay = "--02-21+08:00";
SoapMonthDay monthDay = SoapMonthDay.Parse(xsdMonthDay);
// Print the monthDay in XSD format.
Console.WriteLine("The SoapMonthDay object in XSD format is {0}.",
monthDay.ToString());
// Print the XSD type string of this particular SoapMonthDay object.
Console.WriteLine("The XSD type of the SoapMonthDay object is {0}.",
monthDay.GetXsdType());
// Print the value of the SoapMonthDay object.
Console.WriteLine("The value of the SoapMonthDay object is {0}.",
monthDay.Value);
// Print the XSD type string of the SoapMonthDay class.
Console.WriteLine("The XSD type of the class SoapMonthDay is {0}.",
SoapMonthDay.XsdType);
}
}
Remarks
For more information about XSD data types, see XML Data Types Reference.
Constructors
SoapMonthDay() |
Initializes a new instance of the SoapMonthDay class. |
SoapMonthDay(DateTime) |
Initializes a new instance of the SoapMonthDay class with a specified DateTime object. |
Properties
Value |
Gets or sets the date and time of the current instance. |
XsdType |
Gets the XML Schema definition language (XSD) of the current SOAP type. |
Methods
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() |
Gets the Type of the current instance. (Inherited from Object) |
GetXsdType() |
Returns the XML Schema definition language (XSD) of the current SOAP type. |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
Parse(String) |
Converts the specified String into a SoapMonthDay object. |
ToString() |
Applies to
.NET