SoapYear クラス
アセンブリ: mscorlib (mscorlib.dll 内)

<SerializableAttribute> _ <ComVisibleAttribute(True)> _ Public NotInheritable Class SoapYear Implements ISoapXsd

XSD データ型の詳細については、MSDN ライブラリ (http://msdn.microsoft.com/library) の「XML Data Types Reference」を参照してください。

SoapYear クラスを使用して XSD gYear 型をラップするコード例を次に示します。
using System; using System.Runtime.Remoting.Metadata.W3cXsd2001; public class Demo { public static void Main(string[] args) { // Parse an XSD gYear to create a SoapYear object. // The time zone of this object is -08:00. string xsdYear = "2003-08:00"; SoapYear year = SoapYear.Parse(xsdYear); // Print the year in XSD format. Console.WriteLine("The year in XSD format is {0}." , year.ToString()); // Print the XSD type string of this particular SoapYear object. Console.WriteLine("The XSD type of the SoapYear object is {0}." , year.GetXsdType()); // Print the value of the SoapYear object. Console.WriteLine("The value of the SoapYear object is {0}.", year.Value); // Print the sign of the SoapYear object. Console.WriteLine("The sign of the SoapYear object is {0}.", year.Sign); // Print the XSD type string of the SoapYear class. Console.WriteLine("The XSD type of the class SoapYear is {0}.", SoapYear.XsdType); } }
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 ); }
import System.*; import System.Runtime.Remoting.Metadata.W3cXsd2001.*; public class Demo { public static void main(String[] args) { // Parse an XSD gYear to create a SoapYear object. // The time zone of this object is -08:00. String xsdYear = "2003-08:00"; SoapYear year = SoapYear.Parse(xsdYear); // Print the year in XSD format. Console.WriteLine("The year in XSD format is {0}." , year.ToString()); // Print the XSD type string of this particular SoapYear object. Console.WriteLine("The XSD type of the SoapYear object is {0}." , year.GetXsdType()); // Print the value of the SoapYear object. Console.WriteLine("The value of the SoapYear object is {0}.", year.get_Value()); // Print the sign of the SoapYear object. Console.WriteLine("The sign of the SoapYear object is {0}.", System.Convert.ToString(year.get_Sign())); // Print the XSD type string of the SoapYear class. Console.WriteLine("The XSD type of the class SoapYear is {0}.", System.Convert.ToString(SoapYear.get_XsdType())); } //main } //Demo

System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapYear コンストラクタ ()
アセンブリ: mscorlib (mscorlib.dll 内)


// Create a SoapYear object. SoapYear year = new SoapYear(); year.Value = DateTime.Now; Console.WriteLine("The year is {0}.", year.ToString());

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapYear コンストラクタ (DateTime, Int32)
アセンブリ: mscorlib (mscorlib.dll 内)


// Create a SoapYear object with a positive sign. SoapYear year = new SoapYear(DateTime.Now, 1); Console.WriteLine("The year is {0}.", year.ToString());

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapYear コンストラクタ (DateTime)
アセンブリ: mscorlib (mscorlib.dll 内)


// Create a SoapYear object. SoapYear year = new SoapYear(DateTime.Now); Console.WriteLine("The year is {0}.", year.ToString());

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapYear コンストラクタ

名前 | 説明 |
---|---|
SoapYear () | SoapYear クラスの新しいインスタンスを初期化します。 |
SoapYear (DateTime) | 指定した DateTime オブジェクトを使用して、SoapYear クラスの新しいインスタンスを初期化します。 |
SoapYear (DateTime, Int32) | 指定した DateTime オブジェクトおよび Value が正または負のどちらの値であるかを示す整数を使用して、SoapYear クラスの新しいインスタンスを初期化します。 |

SoapYear プロパティ
SoapYear メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | GetXsdType | 現在の SOAP 型の XML スキーマ定義言語 (XSD) を返します。 |
![]() | Parse | 指定した String を SoapYear オブジェクトに変換します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | オーバーライドされます。 Value を String として返します。 |

SoapYear メンバ
SoapYear データ型で公開されるメンバを以下の表に示します。



名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | GetXsdType | 現在の SOAP 型の XML スキーマ定義言語 (XSD) を返します。 |
![]() | Parse | 指定した String を SoapYear オブジェクトに変換します。 |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | オーバーライドされます。 Value を String として返します。 |

- SoapYearのページへのリンク