SoapHexBinary 类

定义

包装 XSD hexBinary 类型。

public ref class SoapHexBinary sealed : System::Runtime::Remoting::Metadata::W3cXsd2001::ISoapXsd
[System.Serializable]
public sealed class SoapHexBinary : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SoapHexBinary : System.Runtime.Remoting.Metadata.W3cXsd2001.ISoapXsd
[<System.Serializable>]
type SoapHexBinary = class
    interface ISoapXsd
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SoapHexBinary = class
    interface ISoapXsd
Public NotInheritable Class SoapHexBinary
Implements ISoapXsd
继承
SoapHexBinary
属性
实现

示例

下面的代码示例演示如何使用 类中的SoapHexBinary成员在 对象和 XSD hexBinary 字符串之间SoapHexBinary转换。

#using <System.dll>
#using <System.Runtime.Remoting.dll>
using namespace System;
using namespace System::Runtime::Remoting::Metadata::W3cXsd2001;

int main()
{
   // Parse an XSD formatted string to create a SoapHexBinary object.
   String^ xsdHexBinary = L"3f789ABC";
   SoapHexBinary^ hexBinary = SoapHexBinary::Parse( xsdHexBinary );

   // Print the value of the SoapHexBinary object in XSD format.
   Console::WriteLine( L"The SoapHexBinary object in XSD format is {0}.",
      hexBinary );

   // Print the XSD type string of this particular SoapHexBinary object.
   Console::WriteLine( L"The XSD type of the SoapHexBinary object is {0}.",
      hexBinary->GetXsdType() );

   // Print the value of the SoapHexBinary object.
   Console::Write( L"hexBinary.Value contains:" );
   for ( int i = 0; i < hexBinary->Value->Length; ++i )
   {
      Console::Write( L" {0}", hexBinary->Value[ i ] );

   }
   Console::WriteLine();

   // Print the XSD type string of the SoapHexBinary class.
   Console::WriteLine( L"The XSD type of the class SoapHexBinary is {0}.",
      SoapHexBinary::XsdType );
}
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;

public class Demo
{
    public static void Main(string[] args)
    {
        // Parse an XSD formatted string to create a SoapHexBinary object.
        string xsdHexBinary = "3f789ABC";
        SoapHexBinary hexBinary = SoapHexBinary.Parse(xsdHexBinary);

        // Print the value of the SoapHexBinary object in XSD format.
        Console.WriteLine("The SoapHexBinary object in XSD format is {0}.",
            hexBinary.ToString());

        // Print the XSD type string of this particular SoapHexBinary object.
        Console.WriteLine(
            "The XSD type of the SoapHexBinary object is {0}.",
            hexBinary.GetXsdType());

        // Print the value of the SoapHexBinary object.
        Console.Write("hexBinary.Value contains:");
        for (int i = 0 ; i < hexBinary.Value.Length ; ++i)
        {
            Console.Write(" " + hexBinary.Value[i]);
        }
        Console.WriteLine();

        // Print the XSD type string of the SoapHexBinary class.
        Console.WriteLine("The XSD type of the class SoapHexBinary is {0}.",
            SoapHexBinary.XsdType);
    }
}

注解

有关 XSD 数据类型的详细信息,请参阅 XML 数据类型参考

构造函数

SoapHexBinary()

初始化 SoapHexBinary 类的新实例。

SoapHexBinary(Byte[])

初始化 SoapHexBinary 类的新实例。

属性

Value

获取或设置数字的十六进制表示形式。

XsdType

获取当前 SOAP 类型的 XML 架构定义语言 (XSD)。

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
GetXsdType()

返回当前 SOAP 类型的 XML 架构定义语言 (XSD)。

MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
Parse(String)

将指定的 String 转换为 SoapHexBinary 对象。

ToString()

返回 Value 作为 String

适用于