SoapYearMonth Класс
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Заключает в оболочку тип XSD gYearMonth
.
public ref class SoapYearMonth sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapYearMonth : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapYearMonth : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapYearMonth = class
interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapYearMonth = class
interface ISoapXsd
Public NotInheritable Class SoapYearMonth
Implements ISoapXsd
- Наследование
-
SoapYearMonth
- Атрибуты
- Реализации
Примеры
В следующем примере кода показано использование класса для SoapYearMonth переноса типа XSD gYearMonth
.
using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;
int main()
{
// Parse an XSD gYearMonth to create a SoapYearMonth object.
// The timezone of this object is -08:00.
String^ xsdYearMonth = "2003-11-08:00";
SoapYearMonth^ yearMonth = SoapYearMonth::Parse( xsdYearMonth );
// Display the yearMonth in XSD format.
Console::WriteLine( "The yearMonth in XSD format is {0}.",
yearMonth );
// Display the XSD type string of this particular SoapYearMonth object.
Console::WriteLine( "The XSD type of the SoapYearMonth instance is {0}.",
yearMonth->GetXsdType() );
// Display the value of the SoapYearMonth object.
Console::WriteLine( "The value of the SoapYearMonth instance is {0}.",
yearMonth->Value );
// Display the sign of the SoapYearMonth object.
Console::WriteLine( "The sign of the SoapYearMonth instance is {0}.",
yearMonth->Sign );
// Display the XSD type string of the SoapYearMonth class.
Console::WriteLine( "The XSD type of the class SoapYearMonth is {0}.",
SoapYearMonth::XsdType );
}
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
public class Demo
{
public static void Main(string[] args)
{
// Parse an XSD gYearMonth to create a SoapYearMonth object.
// The time zone of this object is -08:00.
string xsdYearMonth = "2003-11-08:00";
SoapYearMonth yearMonth = SoapYearMonth.Parse(xsdYearMonth);
// Display the yearMonth in XSD format.
Console.WriteLine("The yearMonth in XSD format is {0}.",
yearMonth.ToString());
// Display the XSD type string of this SoapYearMonth object.
Console.WriteLine(
"The XSD type of the SoapYearMonth object is {0}.",
yearMonth.GetXsdType());
// Display the value of the SoapYearMonth object.
Console.WriteLine("The value of the SoapYearMonth object is {0}.",
yearMonth.Value);
// Display the sign of the SoapYearMonth object.
Console.WriteLine("The sign of the SoapYearMonth object is {0}.",
yearMonth.Sign);
// Display the XSD type string of the SoapYearMonth class.
Console.WriteLine("The XSD type of the class SoapYearMonth is {0}.",
SoapYearMonth.XsdType);
}
}
Комментарии
Дополнительные сведения о типах данных XSD см. в справочнике по типам данных XML.
Конструкторы
SoapYearMonth() |
Инициализирует новый экземпляр класса SoapYearMonth. |
SoapYearMonth(DateTime) |
Инициализирует новый экземпляр класса SoapYearMonth с указанным объектом DateTime. |
SoapYearMonth(DateTime, Int32) |
Инициализирует новый экземпляр класса SoapYearMonth с заданным объектом DateTime и целое число, указывающее, является ли Value положительным или отрицательным значением. |
Свойства
Sign |
Получает или задает, являются ли дата и время текущего экземпляра положительными или отрицательными. |
Value |
Получает или задает дату и время текущего экземпляра. |
XsdType |
Получает язык определения XML-схемы (XSD) текущего типа SOAP. |
Методы
Equals(Object) |
Определяет, равен ли указанный объект текущему объекту. (Унаследовано от Object) |
GetHashCode() |
Служит хэш-функцией по умолчанию. (Унаследовано от Object) |
GetType() |
Возвращает объект Type для текущего экземпляра. (Унаследовано от Object) |
GetXsdType() |
Возвращает язык определения XML-схемы (XSD) текущего типа SOAP. |
MemberwiseClone() |
Создает неполную копию текущего объекта Object. (Унаследовано от Object) |
Parse(String) |
Преобразует заданный String в объект SoapYearMonth. |
ToString() |
Применяется к
Обратная связь
https://aka.ms/ContentUserFeedback.
Ожидается в ближайшее время: в течение 2024 года мы постепенно откажемся от GitHub Issues как механизма обратной связи для контента и заменим его новой системой обратной связи. Дополнительные сведения см. в разделеОтправить и просмотреть отзыв по