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 クラスのページへのリンク